mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2026-03-19 10:22:42 +01:00
RetroFE constructor arguments set to pass by reference.
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
#include "../Database/Configuration.h"
|
||||
#include "../Utility/Log.h"
|
||||
|
||||
UserInput::UserInput(Configuration *c)
|
||||
UserInput::UserInput(Configuration &c)
|
||||
: Config(c)
|
||||
{
|
||||
}
|
||||
@@ -54,7 +54,7 @@ bool UserInput::MapKey(std::string keyDescription, KeyCode_E key)
|
||||
|
||||
std::string configKey = "controls." + keyDescription;
|
||||
|
||||
if(!Config->GetProperty(configKey, description))
|
||||
if(!Config.GetProperty(configKey, description))
|
||||
{
|
||||
Logger::Write(Logger::ZONE_ERROR, "Configuration", "Missing property " + configKey);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ public:
|
||||
KeyCodeQuit
|
||||
};
|
||||
|
||||
UserInput(Configuration *c);
|
||||
UserInput(Configuration &c);
|
||||
virtual ~UserInput();
|
||||
bool Initialize();
|
||||
SDL_Scancode GetScancode(KeyCode_E key);
|
||||
@@ -34,5 +34,5 @@ private:
|
||||
bool MapKey(std::string keyDescription, KeyCode_E key);
|
||||
std::map<KeyCode_E, SDL_Scancode> KeyMap;
|
||||
|
||||
Configuration *Config;
|
||||
Configuration &Config;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user