Commit graph

292 commits

Author SHA1 Message Date
Morph
ebf4986174 Revert "Port citra-emu/citra#5123: "SDL: Disable hidapi drivers due to compatibility problems with certain controllers"" 2021-02-18 11:16:14 -05:00
Morph
fd772cb778 Merge pull request #5929 from german77/mousePanning
Improve mouse panning
2021-02-16 22:52:35 +08:00
bunnei
0563f37708 Merge pull request #3603 from FearlessTobi/port-5123
Port citra-emu/citra#5123: "SDL: Disable hidapi drivers due to compatibility problems with certain controllers"
2021-02-15 16:25:53 -08:00
bunnei
0ff94cb0cc Merge pull request #4940 from german77/nativeGC
HID: Implement GC controller in game
2021-02-15 10:32:19 -08:00
german
47f0b00c9d Improve mouse panning 2021-02-13 22:23:32 -06:00
bunnei
152e089482 Merge pull request #5869 from german77/mousePanning
input_common: Add mouse panning
2021-02-11 09:58:23 -08:00
Lioncash
4681f5b60b udp: Silence unused member variable warnings
Simply mark them as unused for now.
2021-02-09 17:38:45 -05:00
Lioncash
70b6d985e7 udp/client: Define ClientData constructor/destructor in cpp file
Prevents compilation errors on clang 12 due to incomplete types within a
unique_ptr member.
2021-02-09 17:36:32 -05:00
german
020c22f53d hid: Implement GC controller 2021-02-07 22:59:46 -06:00
german
c7cae8769f Add mouse panning 2021-02-07 20:31:58 -06:00
german
cbe925c31a Add SL SR vectors, change dual joycon view, add missing raw data from keyboard/mouse 2021-02-06 09:43:42 -06:00
german
93ac87f29e Make settings controller image change with controller input 2021-02-06 09:43:41 -06:00
ameerj
37e544492e analog_from_button: Fix update_thread.join exception
This commit aims to address an exception that occurs when trying to join the Analog object's update_thread.

By using an atomic bool for the status of the update thread, we ensure its value is consistent across the threads accessing it.
2021-01-29 18:41:22 -05:00
Morph
6b5e5ad224 sdl_impl: Set the maximum vibration duration to 1 second 2021-01-23 08:06:07 -05:00
german
b92717bec6 Always initialize keyboard input 2021-01-15 09:05:17 -06:00
german
df1070a735 Add mutitouch support for touch screens 2021-01-15 09:05:17 -06:00
german
f452fbfc88 Allow to return up to 16 touch inputs per engine 2021-01-15 09:05:17 -06:00
Morph
23413c0d44 general: Fix various spelling errors 2021-01-02 10:23:41 -05:00
bunnei
2a5e0d3d92 Merge pull request #5265 from german77/port5509
Port citra-emu/citra#5509 "Look at direction of analog axis travel instead of instantaneous sample"
2020-12-30 22:24:30 -08:00
german
f04be5803d Port citra-emu/citra#5509 2020-12-30 22:29:20 -06:00
bunnei
ae5e92e2fb Merge pull request #5236 from gal20/udp_client_patch
input_common: process udp packets only for the correct pad
2020-12-29 02:51:40 -08:00
gal20
2f5fb99b94 udp client: process packets only for the correct pad 2020-12-27 22:22:48 +02:00
german
139222d3a5 Allow to invert analog axis with right click 2020-12-26 17:46:14 -06:00
Morph
439488a842 Merge pull request #5020 from german77/AnalogfromButtonFix
Disable analog joystick from buttons by default
2020-12-08 10:30:21 +08:00
german
1a3e4518ec Disable analog joystick from buttons by default 2020-12-07 19:34:52 -06:00
Lioncash
8e4a23e129 mouse_poller: Remove unused includes 2020-12-03 10:41:13 -05:00
Lioncash
11e20efc1d mouse_input: Invert conditional in UpdateYuzuSettings()
Allows the struct to be constructed in place.
2020-12-03 10:41:13 -05:00
Lioncash
f8b5b65d6b mouse_input: Remove two casts and amend some formatting
Removes the use of two static casts and improves the readability of some
vectors slightly.
2020-12-03 10:41:09 -05:00
Lioncash
64daafbaa0 mouse_input: Resolve a -Wdocumentation warning 2020-12-03 10:26:50 -05:00
Lioncash
09b2703682 mouse_input: Remove unused includes 2020-12-03 10:26:30 -05:00
bunnei
eba344f859 Merge pull request #4937 from german77/multiUDP
InputCommon: Add multiple udp server support
2020-12-01 11:47:37 -08:00
LC
1ec79d0982 Merge pull request #5047 from german77/MouseInput
InputCommon: Fix implicit conversion in mouse input
2020-12-01 09:40:46 -05:00
german
544417cd49 Fix implicit conversion in mouse input 2020-11-30 21:48:18 -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
german
6708e0ec0e Add multiple udp server support 2020-11-25 23:44:41 -06:00
Jan Beich
805312e278 input_common: ignore some Clang warnings after c8aec32f12
error: unknown warning option '-Werror=unused-but-set-parameter'; did you mean '-Werror=unused-parameter'? [-Werror,-Wunknown-warning-option]
error: unknown warning option '-Werror=unused-but-set-variable'; did you mean '-Werror=unused-const-variable'? [-Werror,-Wunknown-warning-option]
2020-11-25 23:57:11 +00:00
bunnei
e4938afd40 Merge pull request #4905 from german77/AnalogFromButton
Allow to dial any angle with digital joystick
2020-11-24 16:04:55 -08:00
bunnei
f2bb584578 input_common: Fix typo in gc_poller.cpp with [[maybe_unused]]. 2020-11-23 21:42:06 -08:00
bunnei
2382020d8d input_common: Add more missing [[maybe_unused]] from #4927. 2020-11-23 20:50:35 -08:00
Lioncash
c8aec32f12 input_common: Treat warnings as errors
Migrates over warnings as errors for input common to match how the
common library treats warnings as errors.
2020-11-22 04:50:03 -05:00
german77
3edd74463f Modify rumble amplification 2020-11-19 11:30:52 -06:00
bunnei
afa4ced6e4 Merge pull request #4866 from Morph1984/mjolnir-p3-prod
Project Mjölnir: Part 3 - Controller Profiles and Vibration Rework
2020-11-17 20:02:27 -08:00
Morph
f5ee5e7f3c sdl_impl: Pump SDL Events at 1000 Hz 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
bd42b2093c controllers/npad: Remove the old vibration filter
Previously we used a vibration filter that filters out amplitudes close to each other. It turns out there are cases where this results into vibrations that are too inaccurate. Remove this and move the 100Hz vibration filter (Only allowing a maximum of 100 vibrations per second) from sdl_impl to npad when enable_accurate_vibrations is set to false.
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
cce389221b 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
ed9df522ec controllers/npad: Add heuristics to reduce rumble state changes
Sending too many state changes in a short period of time can cause massive performance issues.
As a result, we have to use several heuristics to reduce the number of state changes to minimize/eliminate this performance impact while maintaining the quality of these vibrations as much as possible.
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