Commit Graph

21 Commits

Author SHA1 Message Date
Pierre Bourdon e149ad4f0a
treewide: convert GPLv2+ license info to SPDX tags
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
2021-07-05 04:35:56 +02:00
Filoppi a261e61e9e InputCommon: add a ton of missing consts
fix some related grammar errors
only the ButtonManager required code changes
2021-05-10 23:48:10 +03:00
Jordan Woyak 47877ecf2c InputCommon: Clean up creation of inputs. 2020-02-09 19:08:26 -06:00
Jordan Woyak f07457b6cc InputCommon: Eliminate some duplicated button threshold logic. 2020-02-09 10:37:18 -06:00
JosJuice f4da08eb13 Change Wii Remote tilt tooltip string based on translator feedback 2019-10-28 11:16:55 +01:00
Jordan Woyak 673f13b7ac WiimoteEmu: Change default tilt angle to 85 degrees. 2019-10-06 09:56:41 -05:00
Jordan Woyak 260cefd60b WiimoteEmu: Expose maximum tilt acceleration. 2019-10-06 09:56:39 -05:00
Jordan Woyak 5efb717873 InputCommon: Clean up how numeric settings are handled. Add units of measure to UI. Eliminate hidden magic values of the IR cursor. 2019-04-07 09:32:49 -05:00
Jordan Woyak 4db4840d7c WiimoteEmu: Reimplement tilt/swing/camera/orientation data using matrix math. 2019-03-03 12:43:25 -06:00
Jordan Woyak 0064f70c8a DolphinQt/ControllerEmu: Replace Input Radius/Shape settings with an input calibration "wizard". 2019-02-10 07:55:47 -06:00
Jordan Woyak 7efa96eda9 ControllerEmu: code cleanup. 2018-12-30 10:52:45 -06:00
Jordan Woyak 7a00f55cfa ControllerEmu::Cursor: Add input radius/shape settings to IR Cursor mappings to allow use of round inputs in absolute mode. Make relative input option obey the center/width/height settings. Make the mapping indicator pretty and actually show what the relative/center/w/h settings are doing. 2018-12-30 09:10:32 -06:00
Jordan Woyak c3dc3c106c ControllerEmu: Reorganize stick reshaping code and use it for emu wiimote tilt as well. Also make the tilt mapping indicator pretty. 2018-12-29 16:06:03 -06:00
Lioncash 97ba02df27 ControlGroup/Tilt: Return state data by value
Makes it less error-prone to get state data from tilt controls (no need
to pass any pointers to locals), and also allows direct assignment,
letting the retrieved data be const.
2018-07-13 13:20:35 -04:00
JosJuice 7ed28297b2 ControllerEmu: Use enum instead of bool for translatability 2018-04-13 13:04:26 +02:00
JosJuice 3f13dbe087 Translate certain button names but not all
Some button names should be translated, for instance Up, Left and such.
At the same time, some other button names shouldn't be translated,
for reasons that might be less obvious. In 0146456af, I removed the
_trans markers for button names that never need to be translated
(such as A and B), but that isn't actually enough to ensure that
DolphinWX won't try to translate them anyway. This commit adds a bool
that explicitly tells the GUI whether a button name should be translated.
Otherwise we'll have problems like the GUI treating the button name "B"
(which isn't supposed to be translated) as matching the translatable
string "B" (being an abbreviation of "bytes"), meaning that the button
"B" will be labeled "o" when running Dolphin in French (after
translations get pulled from Transifex the next time).

By the way, while it turned out that DolphinWX translated all button
names, it also turned out that DolphinQt2 translated *no* button names.
Go figure. This commit makes them consistent with each other.
2018-04-13 13:04:26 +02:00
JosJuice 0e93c18902 Use _trans consistently for controllers
Some strings were marked with _trans in some places but not
others. This commit adds extra _trans markers so that the
usage of _trans is consistent.

This shouldn't have any effect on which strings actually get
translated. (Note that _trans doesn't do anything at runtime.)

I also added a few new i18n comments.
2017-04-30 14:04:21 +02: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
Lioncash df3a4580ea Tilt: Use std::array for m_tilt 2017-02-11 20:22:42 -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