Commit Graph

138 Commits

Author SHA1 Message Date
c405a19b73 yuzu: Update frontend 2021-11-24 20:30:23 -06:00
5a785ed794 input_common: Rewrite keyboard 2021-11-24 20:30:22 -06:00
fb66a455c4 yuzu qt: Remove global system instances from config, WaitTree, main 2021-10-07 13:50:13 -04:00
b42c3ce21d input_common/tas: Base playback & recording system
The base playback system supports up to 8 controllers (specified by `PLAYER_NUMBER` in `tas_input.h`), which all change their inputs simulataneously when `TAS::UpdateThread` is called.

The recording system uses the controller debugger to read the state of the first controller and forwards that data to the TASing system for recording. Currently, this process sadly is not frame-perfect and pixel-accurate.

Co-authored-by: Naii-the-Baf <sfabian200@gmail.com>
Co-authored-by: Narr-the-Reg <juangerman-13@hotmail.com>
2021-09-18 23:22:00 +02:00
48b6d41f1b input_common: Improve SDL joystick and hide toggle option 2021-08-07 23:11:23 -05:00
dff438e219 Merge pull request #6654 from german77/custom_threshold
input_common: Make button threshold customizable
2021-07-21 20:31:33 -04:00
2c339a5114 configure/ui: Add sliders for trigger buttons 2021-07-17 13:30:43 -05:00
240019feca input_common: Make button threshold customizable 2021-07-15 23:56:57 -05:00
c7478642a6 input_common: Support SDL toggle buttons 2021-07-15 14:31:58 -05:00
058196a089 limitable_input_dialog: Implement character limiter
When using GetText() you can now choose what set of characters the user can't enter.
2021-06-06 09:07:55 +02:00
f20f4587e6 input_common: Implement SDL motion 2021-05-15 08:56:58 -05:00
827dcad26e Merge pull request #6040 from german77/toggleKeyboard
Enable toggle buttons for keyboard and mouse
2021-03-11 11:00:44 -08:00
41e94b7b99 Enable mouse toggle buttons 2021-03-06 13:27:02 -06:00
4bcc5bacff Add toggle button option for normal buttons 2021-03-06 07:36:41 -06:00
1f228c51ca Enable button toggle for keyboard in the modifier button 2021-03-05 19:21:04 -06:00
4738e14cb0 inputCommon: Mouse fixes 2021-02-27 17:53:10 -06:00
a994a40467 hid: Implement GC controller 2021-02-07 22:59:46 -06:00
481cd86722 Make settings controller image change with controller input 2021-02-06 09:43:41 -06:00
61bf850f3d 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
9a9e81f2e9 Fix npad struct to match switchbrew 2021-02-03 20:17:08 -06:00
c1b81f776c Always update handheld config 2021-02-03 17:48:04 -06:00
3b4da2d7fa Fix connect and disconnect controller events 2021-01-23 22:59:44 -06:00
e7c1d7bf77 Always update configuration for handheld 2021-01-17 18:40:27 -06:00
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
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