From 6a75ea5653ec596b1a08e985e98fca0b05ccd6f7 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 8 Feb 2017 22:15:43 -0500 Subject: 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. --- Source/Core/InputCommon/InputConfig.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Source/Core/InputCommon/InputConfig.cpp') 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(); } -- cgit v1.2.3