Commit graph

26 commits

Author SHA1 Message Date
Morph 10ca4c9490 applets/controller: Hook up the "Motion" button functionality
I forgot to hook this up during the development of the controller applet, this PR amends that.
2021-04-13 10:05:07 -04:00
german a994a40467 hid: Implement GC controller 2021-02-07 22:59:46 -06:00
Morph 904ac1daec configure_input: Modify controller connection delay
Increases the controller connection delay to 60ms and refactors it to attempt to disconnect all controllers prior to connecting all controllers in HID.
2021-01-01 06:39:24 -05:00
Morph f6d4a289d5 applets: Resolve variable shadowing 2020-12-05 08:37:13 -05:00
Morph 8758378dc4 applets/controller: Use a pair of emulated controller index to controller type 2020-11-20 22:22:22 -05:00
Morph 97b2220a82 general: Fix compiler warnings on linux and miscellaneous changes 2020-11-15 23:33:21 -05:00
Morph 760a9e8693 applets/controller: Change the input button to create input profiles
Co-authored-by: Its-Rei <kupfel@gmail.com>
2020-11-15 23:33:21 -05:00
Morph 91c06dae1a input: Disconnect a controller prior to connecting a new one
Some games do not respond to a change in controller type if 1) The controller is not disconnected prior to being reconnected and/or 2) The controller is reconnected instantly after being disconnected.

Since it is not possible to change controllers instantly on hardware and requiring a disconnect prior to connecting a new one, we should emulate this as well with a small delay, fixing the aforementioned issue.
2020-11-15 23:33:21 -05:00
Morph e9e1876e82 input_common: Add VibrationDevice and VibrationDeviceFactory
A vibration device is an input device that returns an unsigned byte as status.
It represents whether the vibration device supports vibration or not.
If the status returns 1, it supports vibration. Otherwise, it does not support vibration.
2020-11-15 23:33:20 -05:00
Morph 38110dd485 configure_input: Add per-player vibration
Allows for enabling and modifying vibration and vibration strength per player.
Also adds a toggle for enabling/disabling accurate vibrations.

Co-authored-by: Its-Rei <kupfel@gmail.com>
2020-11-15 23:33:20 -05:00
Morph d6a41cfc21 settings: Remove global vibration strength modifier
This will be replaced in favor of per-player vibration strength modifiers.
2020-11-15 23:33:20 -05:00
Morph 652d6766d5 configure_input: Hook up the vibration percentage spinbox
This allows setting the vibration strength percentage anywhere from 1% to 100%.
Also hooks up the remaining motion button and checkbox in the Controller Applet.
2020-11-15 23:33:20 -05:00
Morph 8f2959f680 settings: Preparation for per-game input settings 2020-11-15 23:33:20 -05:00
Morph 5cafa70d3b applets/controller: Auto accept a valid single player configuration 2020-11-15 23:33:19 -05:00
bunnei 9f08cea2c4
Merge pull request #4834 from lioncash/copy-fn
controller: Pass ControllerParameters by reference in ReconfigureControllers()
2020-10-26 18:49:26 -07:00
Lioncash 6b5f565324 controller: Pass ControllerParameters by reference in ReconfigureControllers()
Prevents unnecessary copies and heap reallocations from occurring.
2020-10-26 21:06:15 -04:00
Rodrigo Locatti 2f6ba54483
Merge pull request #4827 from lioncash/trunc
controller: Convert led_patterns integer literals to bool literals
2020-10-25 16:56:30 -03:00
Lioncash 98f4c5e7b8 general: Use template deduction guides for lock_guard
Same behavior, less code.
2020-10-25 13:53:22 -04:00
Lioncash 061a63547f controller: Convert led_patterns integer literals to bool literals
'bool' isn't always guaranteed to be the same size as an int, so this
can technically cause truncation warnings if we support other platforms.
2020-10-25 13:44:12 -04:00
Morph b65456b958 applets/controller: Resolve several compiler warnings
Resolves -Wsign-compare and -Wunused-variable
2020-09-04 12:23:26 -04:00
Morph 076e4d44c3 Address feedback 2020-09-04 12:23:25 -04:00
Morph 1ec71b6ea0 clang-format 2020-09-04 12:23:25 -04:00
Morph 72b2f5d34f applets/controller: Load configuration prior to setting up connections
This avoids unintentionally changing the states of elements while loading them in.
2020-09-04 12:23:25 -04:00
Morph aeec0f8a38 applets/controller: Make 8 a static constexpr value of NUM_PLAYERS
Avoids repetitive usages of the int literal '8' or calls to player_widgets.size()
2020-09-04 12:23:25 -04:00
Morph 5ce3015945 applets/controller: Implement "Explain Text"
"Explain Text" is additional text that is shown for each player in the controller applet.
2020-09-04 12:23:25 -04:00
Morph 5219615418 Project Mjölnir: Part 2 - Controller Applet
Co-authored-by: Its-Rei <kupfel@gmail.com>
2020-09-04 12:23:25 -04:00