Commit Graph

64 Commits

Author SHA1 Message Date
80fece4e08 Allow to invert analog axis with right click 2020-12-26 17:46:14 -06:00
7bc3e80399 Merge pull request #4939 from german77/MouseInput
InputCommon: Implement full mouse support
2020-11-29 22:59:50 -08:00
e46f0e084c Implement full mouse support 2020-11-25 23:59:30 -06:00
102630f2b2 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
be4fc777c0 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
b254d528bc configure_input: Accommodate for the mouse input device engine 2020-11-15 23:33:21 -05:00
6f5b942897 configure_input: Update the input profiles for other player tabs 2020-11-15 23:33:21 -05:00
97b2220a82 general: Fix compiler warnings on linux and miscellaneous changes 2020-11-15 23:33:21 -05:00
117bdc71e0 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
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
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
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
ceb7b11f16 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
8f2959f680 settings: Preparation for per-game input settings 2020-11-15 23:33:20 -05:00
57d89e291d input_profiles: Implement input profiles 2020-11-15 23:33:19 -05:00
75eaab2e0f 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
ff82f3894a configure_input_player: Fix modifier buttons
Fix them for real this time, now they finally work.
2020-10-20 14:23:25 -04:00
70499b8cbd configure_input_player: Fixes motion mapping using ConfigureButtonClick 2020-09-18 03:56:31 -04:00
65d9def873 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
3f6d83b27c Merge pull request #4594 from german77/MotionHID
hid/configuration: Implement motion controls to HID
2020-09-17 12:39:01 -07:00
41b8ecdeb6 Merge pull request #4608 from lioncash/sign3
configure_input_player: Resolve sign conversion warnings in UpdateMappingWithDefaults()
2020-09-10 13:56:16 -04:00
5b6268d26a 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
6ee8eab670 Add cemu hook changes related to PR #4609 2020-09-04 21:48:13 -05:00
8e18b61972 configure_input_player: Show/hide motion buttons based on the controller 2020-09-04 21:48:13 -05:00
ff679f3d17 Include HID and configuration changes related to motion 2020-09-04 21:48:03 -05:00
92c162126b 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
403e36fab2 yuzu/configuration: Fix index out of bounds for default_analogs 2020-08-29 00:24:47 -04:00
9e1b0af259 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
f5f30781ae configure_input_player: Fix modifier scale button mapping 2020-08-26 02:32:32 -04:00
1bd70d73c0 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
efa0b7a056 Address feedback 2020-08-26 02:32:32 -04:00
f0fac0c7fb 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
b724a4d90c General: Tidy up clang-format warnings part 2 2020-08-13 14:19:08 -04:00
b249e4e0ce 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
6e1639c7b0 Fix unnecessary diffs 2020-07-02 16:51:16 -04:00
6b7c8e469b 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
901bc09dd7 Small quality of life indication that mapped button is GC 2020-06-22 22:02:50 -04:00
121af3646d Singleton GC Adapter class, remove globals, fix naming convention
Fix clang formatting

Manual fix for configure_input_player formatting

Add missing lib usb cmake command
2020-06-21 21:17:07 -04:00
c94583d867 Clang Formatting 2020-06-21 15:31:57 -04:00
0248614add GC Adapter Implementation 2020-06-21 12:36:28 -04:00
aaa4822fcb Actually save the input when clearing/resetting to default
Co-Authored-By: xperia64 <xperiancedapps@gmail.com>
2020-06-03 05:17:34 +02:00
8d917e14f8 Edit modifier_scale with the deadzone slider 2020-04-23 06:32:39 +02:00
aa6214feb7 yuzu/configuration: Only assert that all buttons exist when we are handling the click for a button device
This fixes failed assertions that were present in yuzu master code for 18 months.
2020-04-05 07:16:09 +02:00
2fa9a96309 const correction 2020-01-03 10:30:51 +01:00
90f9c830ca clang 2020-01-03 09:31:54 +01:00
351e3fb72e Update configure_input_player.cpp 2020-01-03 09:11:34 +01:00
4a566b9828 Added deadzone controls for sdl engine at input settings 2020-01-03 08:54:57 +01:00
be5dc68ca3 fixed clang format & addressed feedback 2019-10-10 23:27:00 +02:00
a31c6b2c4e yuzu/configure_input_player: Fix input handling for ZL and ZR from controllers with analog triggers 2019-10-10 23:12:06 +02:00
22fd208e8d Add cancel option to analog stick configuration
Co-Authored-By: Vitor K <vitor-k@users.noreply.github.com>
2019-09-03 22:53:59 +02:00