Gets some constants out of the ControllerEmu namespace, and modifies
ControlGroup so that it uses the enum type itself to represent the
underlying type, rather than a u32 value.
4bd5674 changed "Wiimote" to "Wii Remote" in the GUI
(intentionally) but also did the same change for two INI
keys (seemingly unintentional, breaks backwards compatibility,
and is inconsistent with the INI's filename). This commit
reverts the INI keys but not the GUI strings.
This commit uses the same approach as cbd539e used for GameCube
sticks (but I made sure to avoid the bug that 56531a0 fixed).
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.
Better separation of concerns. Relegates `ControllerInterface` to
enumerating input controls, and the new `ControlReference` deals with
combining inputs and configuration expression parsing.
ControllerEmu is a massive class with a lot of nested public classes.
The only reason these are nested is because the outer class acts as a
namespace. There's no reason to keep these classes nested just for that.
Keeping these classes nested makes it impossible to forward declare them, which leads to quite a few includes in other headers, making compilation take
longer.
This moves the source files to their own directory so classes can be
separated as necessary to their own source files, and be namespaced under the
ControllerEmu namespace.
This fixes a crash when trying to open the advanced input config dialog on the wiimote extensions. The device_cbox wasn't initialised and it should have been with the wiimote one.
The constructor shouldn't be used as a dumping ground for all UI-related
initialization. Doing so makes it somewhat more difficult to reason about
how certain UI elements get created. It also puts unrelated identifiers in
the same scope.
This separates the UI creation out so code relevant to each component
is self-contained.
This is done to not have the device combo box be too small in width when making the main sizer fit into the window. Not fitting the sizer would alternatively break Hidpi so it was best to just add an empty sizer to workaround this problem.
This is more logical as the mic is plugged into an EXI slot so it should be configured via the GameCube config dialog. This also allows to pass the right port number for the new dialog.
The SDL backend crashes when you close a joystick after SDL_Quit has
been called. Some backends don't need to be shutdown and
re-initialized everytime, we can just ask to enumerate devices again.
Hotkeys
Make a new class that inherits from InputConfigDialog with a specialised constructor. The changes are mainly the top portion and it now uses tabs to categorise the hotkeys.
Redo the GCPad configuration dialog
The layout is similar, but it now allows flexibility to change it more easily.
Redo the GC Keyboard configuration dialog
Same layout.
Redo completely the Wiimote configuration dialog
Separated the controls into 2 tabs to make them less imposing overall.
Redo the Nunchuk configuration dialog
Similar layout, except for 2 control group sizers.
Redo the Classic controller configuration dialog
Same layout.
Redo the Guitar input configuration dialog
Stacked 2 sets of group together.
Redo the Turntable configuration dialog
More stacked groups and the window is much less wide.
Just setting up a switch on the type so that different dialogs can be instantiated. This also makes the extension type an enum because I don't see why not here and finally, it removes ControlGroupSizer. This removal allows to not dynamically generate the UI, but instead, let the specialised constructors do the layout.
Removed the unecessary forced tabbed layout, removed the layout part of the constructor and remade some method in preparation for tabbed styled input dialog such as the new hotkey configuration one. It breaks every inputconfigDialog, but this will get fixed in the next commits.
Also moved to a folder since there will be many more files created in the next commits so it gives better separation.