Commit Graph

24 Commits

Author SHA1 Message Date
Mat M eb8dbe03ad Merge pull request #5349 from JosJuice/more-incorrect-trans
Remove incorrect usage of _trans
2017-04-30 18:20:19 -04:00
JosJuice 8b5980f33e Remove incorrect usage of _trans
It only marks a string for translation. It doesn't actually do anything
at runtime, so the string will always be displayed in English. Even if
we would've had a way to make the translation work, we shouldn't
translate this, because OSD doesn't support non-ASCII characters.
2017-04-30 15:15:08 +02:00
JosJuice b248016e41 Mark "Recenter" for translation 2017-04-30 14:05:05 +02:00
Lioncash 14c81764df ControllerEmu: Replace includes with forward declarations
Replaces includes with forward declarations where applicable, and moves
includes to where they're actually needed.
2017-04-04 20:38:30 -04:00
Michael Maltese 1b0701e988 Make ControllerEmu::BooleanSetting non-virtual 2017-03-13 13:47:06 -07:00
Michael Maltese c4ba046aa3 Remove unused ControllerEmu::BackgroundInputSetting 2017-03-13 13:47:01 -07:00
Lioncash b592e4887e BooleanSetting: Initialize m_value to default_value in the constructor
Ensures all class state is initialized to valid values on construction.
2017-03-03 14:09:48 -05:00
Lioncash 25e70570b5 NumericSettings: Initialize m_value to default_value in the constructor
Ensures that all class state is initialized to valid values.
2017-03-03 14:06:16 -05:00
Michael Maltese 1539ff6691 InputCommon: move Setting classes out of ControlGroup 2017-03-02 18:08:37 -08:00
Lioncash 26f17a1723 ControlGroup: Convert group type enum into an enum class
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.
2017-02-25 01:15:04 -05:00
JosJuice f5c82adc59 Change INI keys containing "Wii Remote" back to "Wiimote"
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).
2017-02-18 12:59:36 +01:00
Mat M 5a53763c1a Merge pull request #4892 from lioncash/control
Control: Convert raw pointer parameter into unique_ptr
2017-02-15 11:26:53 -05:00
Lioncash 1a99e70ed7 Force: Use std::array for m_swing 2017-02-11 20:22:50 -05:00
Lioncash df3a4580ea Tilt: Use std::array for m_tilt 2017-02-11 20:22:42 -05:00
JosJuice d19aabb55b Merge pull request #4895 from lioncash/const
ControllerEmu: Add const to UpdateReferences() first reference parameter
2017-02-11 09:27:37 +01:00
JosJuice e568d57022 Merge pull request #4894 from lioncash/private
Cursor: Make m_z private
2017-02-11 09:26:30 +01:00
Lioncash 98145d2160 ControllerEmu: Add const to UpdateReferences() first reference parameter
None of these parameters are modified.
2017-02-11 00:31:49 -05:00
Lioncash e4bdc88494 Cursor: Make m_z private
This isn't used directly anywhere (and really shouldn't be public
anyways).
2017-02-10 23:57:50 -05:00
Lioncash fda235b6e3 Buttons: Use a delegating constructor
Basic code deduplication
2017-02-10 19:52:15 -05:00
Lioncash d07d9f3110 Control: Convert raw pointer parameter into unique_ptr
Raw pointers shouldn't be used as boundaries in scenarios where ownership
is being taken.
2017-02-10 19:35:02 -05:00
Lioncash 6a75ea5653 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.
2017-02-09 18:18:52 -05:00
Lioncash 56531a0b7f ControllerEmu: Fix incorrect default radius being set in AnalogStick
The three parameter AnalogStick constructor takes an internal name, a
display name, and a default radius argument. The delegated constructor is
the one that calls the ControlGroup constructor, setting the group type,
so passing the group type here is a logic bug.

The only reason this appeared to work despite this bug is because
GROUP_TYPE_STICK has a value of 1, and the default radius value used for
attachment sticks is 1.0.
2017-02-08 23:08:13 -05:00
Michael Maltese a509f56116 InputCommon: Extract ControlReference from ControllerInterface
Better separation of concerns. Relegates `ControllerInterface` to
enumerating input controls, and the new `ControlReference` deals with
combining inputs and configuration expression parsing.
2017-02-07 22:59:10 -08:00
Lioncash 3a66f2c008 ControllerEmu: Move into its own directory
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.
2017-02-07 22:12:06 -05:00