Commit graph

127 commits

Author SHA1 Message Date
bunnei
d0933e20e0 Merge pull request #6040 from german77/toggleKeyboard
Enable toggle buttons for keyboard and mouse
2021-03-11 11:00:44 -08:00
german77
9c42c9e164 Enable mouse toggle buttons 2021-03-06 13:27:02 -06:00
german
0b24257e2c Add toggle button option for normal buttons 2021-03-06 07:36:41 -06:00
german
03c81d5e1f Enable button toggle for keyboard in the modifier button 2021-03-05 19:21:04 -06:00
german77
a380976857 inputCommon: Mouse fixes 2021-02-27 17:53:10 -06:00
german
020c22f53d hid: Implement GC controller 2021-02-07 22:59:46 -06:00
german
93ac87f29e Make settings controller image change with controller input 2021-02-06 09:43:41 -06:00
bunnei
f41e6fba60 Merge pull request #5326 from german77/hidUpdate1
HID: Update the HID service to match more closely to switchbrew part 1
2021-02-06 02:40:11 -08:00
german
5c9d8e8f39 Fix npad struct to match switchbrew 2021-02-03 20:17:08 -06:00
german
ebf3784c75 Always update handheld config 2021-02-03 17:48:04 -06:00
german
c806340f31 Fix connect and disconnect controller events 2021-01-23 22:59:44 -06:00
german
27dee554d5 Always update configuration for handheld 2021-01-17 18:40:27 -06:00
Morph
dd73d7eb8e 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
german
139222d3a5 Allow to invert analog axis with right click 2020-12-26 17:46:14 -06:00
bunnei
0c0c14ca1e Merge pull request #4939 from german77/MouseInput
InputCommon: Implement full mouse support
2020-11-29 22:59:50 -08:00
german
56a8fee35a Implement full mouse support 2020-11-25 23:59:30 -06:00
Morph
a8ba5c5929 configure_input_player: Use the npad style set to show the available controllers
This will reduce the likelihood of an invalid controller type to be set within a game
2020-11-20 22:22:22 -05:00
Lioncash
8e015472a3 configure_input_player: Use static qualifier for IsProfileNameValid()
This is a static member function, so we don't need use an existing
instance to call this function.
2020-11-17 23:12:44 -05:00
Morph
7af3c351ac configure_input: Accommodate for the mouse input device engine 2020-11-15 23:33:21 -05:00
Morph
23cc14cd09 configure_input: Update the input profiles for other player tabs 2020-11-15 23:33:21 -05:00
Morph
75ee0c94a0 general: Fix compiler warnings on linux and miscellaneous changes 2020-11-15 23:33:21 -05:00
Morph
24cfdbc7fe sdl_impl: Revert to the "old" method of mapping sticks
Not all controllers have a SDL_GameController binding. This caused controllers not present in the SDL GameController database to have buttons mapped instead of axes.

Furthermore, it was not possible to invert the axes when it could be useful such as emulating a horizontal single joycon or other potential cases. This allows us to invert the axes by reversing the order of mapping (vertical, then horizontal).
2020-11-15 23:33:21 -05:00
Morph
f80127d4e0 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
ad45ceeaf0 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
ad3905fe27 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
b29a52982a configure_input_player: Change "Defaults" button behavior
RestoreDefaults() now restores the selected devices' mappings using UpdateMappingWithDefaults().
This allows us to move the keyboard mapping from RestoreDefaults() to UpdateMappingWithDefaults().
2020-11-15 23:33:20 -05:00
Morph
1c1a83a20d settings: Preparation for per-game input settings 2020-11-15 23:33:20 -05:00
Morph
c3a9d5de40 input_profiles: Implement input profiles 2020-11-15 23:33:19 -05:00
Morph
ad9a909bc7 configure_input_player: Implement input exclusivity and persistence
With this, the "Input Devices" combobox should accurately reflect the input device being used and disallows inputs from other input devices unless the input device is set to "Any".
2020-11-15 23:33:19 -05:00
Morph
6fa2144d90 configure_input_player: Fix modifier buttons
Fix them for real this time, now they finally work.
2020-10-20 14:23:25 -04:00
Morph
a769682977 configure_input_player: Fixes motion mapping using ConfigureButtonClick 2020-09-18 03:56:31 -04:00
Morph
8be3c010bb configure_input_player: Re-add "Clear" context menu option
The context menu was removed in Mjölnir Part 1 as part of the input rewrite as we were unaware of it's usage statistics.
However, as this was the only way to clear the inputs of individual buttons, this PR will re-add it back in.
2020-09-17 21:57:06 -04:00
bunnei
9a2553c952 Merge pull request #4594 from german77/MotionHID
hid/configuration: Implement motion controls to HID
2020-09-17 12:39:01 -07:00
bunnei
0e021082fc Merge pull request #4608 from lioncash/sign3
configure_input_player: Resolve sign conversion warnings in UpdateMappingWithDefaults()
2020-09-10 13:56:16 -04:00
Morph
55db7a4e0a configure_input: Hook up the motion button and checkbox
This allows toggling motion on or off, and allows access to the motion configuration.
Also changes the [waiting] text for motion buttons to Shake! as this is how motion is connected to a player.
2020-09-05 09:46:34 -04:00
german
82eb4be33b Add cemu hook changes related to PR #4609 2020-09-04 21:48:13 -05:00
Morph
4c09c78391 configure_input_player: Show/hide motion buttons based on the controller 2020-09-04 21:48:13 -05:00
german
876e6fc255 Include HID and configuration changes related to motion 2020-09-04 21:48:03 -05:00
Lioncash
9f9e02ba58 configure_input_player: Resolve sign conversion warnings in UpdateMappingWithDefaults()
Prevents sign mismatch warnings in the loop conditionals.
2020-08-29 16:43:12 -04:00
Morph
c20b902843 yuzu/configuration: Fix index out of bounds for default_analogs 2020-08-29 00:24:47 -04:00
Lioncash
affbf8e188 input_common: Eliminate most global state
Abstracts most of the input mechanisms under an InputSubsystem class
that is managed by the frontends, eliminating any static constructors
and destructors. This gets rid of global accessor functions and also
allows the frontends to have a more fine-grained control over the
lifecycle of the input subsystem.

This also makes it explicit which interfaces rely on the input subsystem
instead of making it opaque in the interface functions. All that remains
to migrate over is the factories, which can be done in a separate
change.
2020-08-27 16:11:17 -04:00
Morph
0d6a2a37d2 configure_input_player: Fix modifier scale button mapping 2020-08-26 02:32:32 -04:00
Morph
bc37d84a84 configuration/input: Add support for mouse button clicks
Supports the Left, Right, Middle, Backward and Forward mouse buttons.
2020-08-26 02:32:32 -04:00
Morph
24ce544120 Address feedback 2020-08-26 02:32:32 -04:00
Morph
34a209d15c Project Mjölnir: Part 1
Co-authored-by: James Rowe <jroweboy@gmail.com>
Co-authored-by: Its-Rei <kupfel@gmail.com>
2020-08-26 02:32:32 -04:00
Lioncash
78ddcbe3ba General: Tidy up clang-format warnings part 2 2020-08-13 14:19:08 -04:00
Lioncash
08e30e0240 yuzu: Resolve C++20 deprecation warnings related to lambda captures
C++20 deprecates capturing the this pointer via the '=' capture.
Instead, we replace it or extend the capture specification.
2020-08-03 11:54:04 -04:00
Ameer
33c08afba9 Fix unnecessary diffs 2020-07-02 16:51:16 -04:00
Ameer
12e679c39c Add LR triggers as axes, half press to initiate a press, add GC axis id in config, clarify some code blocks for better readability 2020-07-02 15:54:44 -04:00
Ameer
e8c8a5bafd Small quality of life indication that mapped button is GC 2020-06-22 22:02:50 -04:00