Commit graph

27 commits

Author SHA1 Message Date
bunnei
7a76bc30fa common: Move settings to common from core.
- Removes a dependency on core and input_common from common.
2021-04-14 16:24:03 -07: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
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
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
Morph
23cc14cd09 configure_input: Update the input profiles for other player tabs 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
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
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
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
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
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
Kewlan
0e86640777 Edit modifier_scale with the deadzone slider 2020-04-23 06:32:39 +02:00
CJBok
f4d746e41e Added deadzone controls for sdl engine at input settings 2020-01-03 08:54:57 +01:00
Lioncash
fb580dcda2 yuzu/configuration: Make all widgets and dialogs aware of language changes
To prepare for translation support, this makes all of the widgets
cognizant of the language change event that occurs whenever
installTranslator() is called and automatically retranslates their text
where necessary.

This is important as calling the backing UI's retranslateUi() is often
not enough, particularly in cases where we add our own strings that
aren't controlled by it. In that case we need to manually refresh the
strings ourselves.
2019-06-05 21:57:21 -04:00
Lioncash
5bcab18c77 yuzu/configuration: Make function naming consistent 2019-06-05 15:40:33 -04:00
Lioncash
bf796fd5dd yuzu/configuration/configure_input_player: Forward declare types where applicable
Allows removing the inclusion of the main input common header from the
UI config header.
2019-01-17 12:08:15 -05:00
Lioncash
271b079fc7 yuzu/configure_input_player: Use std::size_t to represent the player index instead of u8
Prevents compiler warnings related to truncation when invoking the
dialog. It's also extremely suspect to use a u8 value here instead of a
more general type to begin with.
2018-11-27 16:37:21 -05:00
Lioncash
9964a076c7 yuzu/configure_input*: Move data members after function declarations
The common pattern is to put the data members after the function
interface where applicable.
2018-11-27 05:02:15 -05:00
Zach Hilman
b131a4bbb2 configure_input: Make None a controller option instead of checkbox 2018-11-18 23:22:36 -05:00
Zach Hilman
2d8a5a4e9b hid: Use player-defined controller type as PREFERRED_CONTROLLER 2018-11-18 23:22:36 -05:00
Zach Hilman
25c07217cf qt: Move controller button config to separate dialog
Handles button configuration for all controller layouts and debug pads. Configurable at construction.
2018-11-18 23:22:36 -05:00