Skip to content
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

Merged
merged 1 commit into from Feb 10, 2017

Conversation

lioncash
Copy link
Member

@lioncash lioncash commented Feb 9, 2017

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.

@lioncash lioncash force-pushed the controller-emu branch 2 times, most recently from e6df5f2 to 511ec6f Compare February 9, 2017 14:56
#include "Core/HW/GCKeyboardEmu.h"
#include "InputCommon/ControllerInterface/ControllerInterface.h"

This comment was marked as off-topic.

This comment was marked as off-topic.

@@ -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.

#include "Common/ChunkFile.h"
#include "Common/CommonTypes.h"

This comment was marked as off-topic.

This comment was marked as off-topic.

#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.

#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.

@@ -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.

#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.

Copy link
Contributor

@ligfx ligfx left a 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.
@lioncash lioncash merged commit f6d364e into dolphin-emu:master Feb 10, 2017
@lioncash lioncash deleted the controller-emu branch February 10, 2017 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants