summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/InputConfig.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2017-02-08 22:15:43 -0500
committerLioncash <mathew1800@gmail.com>2017-02-09 18:18:52 -0500
commit6a75ea5653ec596b1a08e985e98fca0b05ccd6f7 (patch)
treed76f549ca6c7591fa2b11a86f63e0351b418f4c8 /Source/Core/InputCommon/InputConfig.cpp
parent1385a012d94bbec76bc8b2922467c715b63f0158 (diff)
ControllerEmu: Separate ControlGroup from ControllerEmu
ControllerEmu, the class, is essentially acting like a namespace for ControlGroup. This makes it impossible to forward declare any of the internals. It also globs a bunch of classes together which is kind of a pain to manage. This splits ControlGroup and the classes it contains into their own source files and situates them all within a namespace, which gets them out of global scope. Since this allows forward declarations for the once-internal classes, it now requires significantly less files to be rebuilt if anything is changed in the ControllerEmu portion of code. It does not split out the settings classes yet, however, as it would be preferable to make a settings base class that all settings derive from, but this would be a functional change -- this commit only intends to move around existing code. Extracting the settings class will be done in another commit.
Diffstat (limited to 'Source/Core/InputCommon/InputConfig.cpp')
-rw-r--r--Source/Core/InputCommon/InputConfig.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/Core/InputCommon/InputConfig.cpp b/Source/Core/InputCommon/InputConfig.cpp
index 1a723c5fbb..86bda0189f 100644
--- a/Source/Core/InputCommon/InputConfig.cpp
+++ b/Source/Core/InputCommon/InputConfig.cpp
@@ -9,10 +9,19 @@
#include "Common/MsgHandler.h"
#include "Core/ConfigManager.h"
#include "Core/HW/Wiimote.h"
+#include "InputCommon/ControllerEmu/ControlGroup/ControlGroup.h"
#include "InputCommon/ControllerEmu/ControllerEmu.h"
#include "InputCommon/ControllerInterface/ControllerInterface.h"
#include "InputCommon/InputConfig.h"
+InputConfig::InputConfig(const std::string& ini_name, const std::string& gui_name,
+ const std::string& profile_name)
+ : m_ini_name(ini_name), m_gui_name(gui_name), m_profile_name(profile_name)
+{
+}
+
+InputConfig::~InputConfig() = default;
+
bool InputConfig::LoadConfig(bool isGC)
{
IniFile inifile;
@@ -104,7 +113,7 @@ void InputConfig::SaveConfig()
inifile.Save(ini_filename);
}
-ControllerEmu* InputConfig::GetController(int index)
+ControllerEmu::EmulatedController* InputConfig::GetController(int index)
{
return m_controllers.at(index).get();
}