New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ControllerEmu: Separate ControlGroup from ControllerEmu #4873
Conversation
e6df5f2
to
511ec6f
Compare
Source/Core/Core/HW/GCKeyboard.cpp
Outdated
#include "Core/HW/GCKeyboardEmu.h" | ||
#include "InputCommon/ControllerInterface/ControllerInterface.h" |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
@@ -8,7 +8,15 @@ | |||
|
|||
#include "InputCommon/ControllerEmu/ControllerEmu.h" | |||
|
|||
struct GCPadStatus; |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
#include "Common/ChunkFile.h" | ||
#include "Common/CommonTypes.h" | ||
|
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
#include "Core/HW/WiimoteEmu/WiimoteEmu.h" | ||
#include "InputCommon/ControllerEmu/ControlGroup/ControlGroup.h" |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
#include "Core/Core.h" | ||
#include "Core/Debugger/Debugger_SymbolMap.h" | ||
#include "Core/Debugger/PPCDebugInterface.h" | ||
#include "Core/HW/CPU.h" | ||
#include "Core/HW/Memmap.h" | ||
#include "Core/HW/SystemTimers.h" |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
@@ -23,10 +23,10 @@ | |||
#include <wx/spinctrl.h> | |||
#include <wx/timer.h> | |||
|
|||
#include "InputCommon/ControlReference/ControlReference.h" | |||
#include "InputCommon/ControllerEmu/ControllerEmu.h" | |||
#include "InputCommon/ControllerEmu/ControlGroup/ControlGroup.h" |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
#include <string> | ||
|
||
#include "Common/CommonTypes.h" | ||
#include "Core/HW/WiimoteEmu/Attachment/Attachment.h" |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty straightforward.
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.
511ec6f
to
6a75ea5
Compare
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 from ControlGroup yet, however, as splitting those out will need to have more functional changes made, rather than just essentially moving code from point A to point B.