Commit Graph

57 Commits

Author SHA1 Message Date
ae57a99d7d core: hid: Split SL and SR buttons 2023-11-11 21:03:15 -06:00
aa882cdaa8 input_common: set SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS to 0
This allows to share the mappings between Nintendo and non-Nintendo controllers.
Breaks the controller configuration for existing users who are using a Nintendo controller.

(Documentation of the hint 92b3c53c92/include/SDL_hints.h (L512-L532))
2023-07-07 21:59:47 +02:00
f254ce2c60 Merge pull request #10679 from zeltermann/wakelock-reason
Only use SDL wakelock on Linux
2023-06-27 11:21:20 -04:00
474fa13a1a input_common: Make use of new SDL features 2023-06-24 17:42:56 -06:00
482fbded9b Only use SDL wakelock on Linux
SDL has internally fixed shenanigans related to wakelocking through DBus
from inside sandboxes from around August 2022, so we can now remove the
workaround we used since 2021.
2023-06-24 14:51:41 +07:00
0a6bd8b236 Improve emulation of HD Rumble 2023-05-05 19:30:40 +02:00
96b8a3ecac input_common: sdl: Only send last vibration command 2023-03-12 21:30:02 -06:00
600f325d87 general: fix spelling mistakes 2023-03-12 11:33:01 -04:00
683019878f remove static from pointer sized or smaller types for aesthetics, change constexpr static to static constexpr for consistency
Signed-off-by: arades79 <scravers@protonmail.com>
2023-02-14 12:35:39 -05:00
45e13b03f3 add static lifetime to constexpr values to force compile time evaluation where possible
Signed-off-by: arades79 <scravers@protonmail.com>
2023-02-14 12:33:11 -05:00
acba9a6b76 input_common: Reintroduce custom pro controller support 2023-02-09 20:08:54 -06:00
a68af583ea Merge pull request #9492 from german77/joycon_release
Input_common: Implement custom joycon driver v2
2023-01-24 09:29:37 -05:00
340f15d1fa input_common: Address byte review 2023-01-20 00:51:45 -06:00
b40aefb39e input_common: Drop Pro controller support from custom driver 2023-01-19 18:05:22 -06:00
527dad7097 input_common: Use DriverResult on all engines 2023-01-19 18:05:22 -06:00
2d802893e7 input_common: Disable SDL driver with switch controllers 2023-01-19 18:05:20 -06:00
db6cb9cc0a input_common: reset sdl motion if data is invalid 2023-01-18 10:05:55 -06:00
3e1e6c66c0 input_common: Filter SDL GUID 2022-12-12 10:37:55 -06:00
7d8095d944 input_common: Pump sdl events from main thread 2022-11-27 11:09:40 -06:00
77803d96be Merge pull request #9107 from german77/gidoly_rules
input_common: cache vibration tests
2022-10-25 12:13:18 -04:00
e6ab1f673b general: Enforce C4800 everywhere except in video_core 2022-10-22 15:02:04 -04:00
7f66050f0c input_common: cache vibration tests 2022-10-21 00:24:08 -05:00
35d3e7db2a common: remove "yuzu:" prefix from thread names 2022-10-03 18:43:56 -04:00
c3b16cf8d3 input_common: sdl: Always check for motion on reconnect 2022-09-03 17:52:57 -05:00
cdb240f3d4 chore: make yuzu REUSE compliant
[REUSE] is a specification that aims at making file copyright
information consistent, so that it can be both human and machine
readable. It basically requires that all files have a header containing
copyright and licensing information. When this isn't possible, like
when dealing with binary assets, generated files or embedded third-party
dependencies, it is permitted to insert copyright information in the
`.reuse/dep5` file.

Oh, and it also requires that all the licenses used in the project are
present in the `LICENSES` folder, that's why the diff is so huge.
This can be done automatically with `reuse download --all`.

The `reuse` tool also contains a handy subcommand that analyzes the
project and tells whether or not the project is (still) compliant,
`reuse lint`.

Following REUSE has a few advantages over the current approach:

- Copyright information is easy to access for users / downstream
- Files like `dist/license.md` do not need to exist anymore, as
  `.reuse/dep5` is used instead
- `reuse lint` makes it easy to ensure that copyright information of
  files like binary assets / images is always accurate and up to date

To add copyright information of files that didn't have it I looked up
who committed what and when, for each file. As yuzu contributors do not
have to sign a CLA or similar I couldn't assume that copyright ownership
was of the "yuzu Emulator Project", so I used the name and/or email of
the commit author instead.

[REUSE]: https://reuse.software

Follow-up to 01cf05bc75
2022-07-27 12:53:49 +02:00
5e7e55b98a input_common: sdl: lower vibration frequency and use it's own unique thread 2022-06-28 19:22:16 -05:00
28877cea31 input_common: Replace usage of string guid to common uuid 2022-06-06 19:56:37 -05:00
bf948b5790 input_common: Make vibration request async 2022-05-23 12:25:02 -05:00
764e5c7fe5 Merge pull request #7978 from german77/sideway
input_common: Map sticks correctly when mapped sideways
2022-04-21 22:21:59 -07:00
159ae5e47c input_common: Replace lock_guard with scoped_lock 2022-04-07 19:44:07 +01:00
ee532e5c01 input_common: Map sticks correctly when mapped sideways 2022-03-21 19:39:33 -06:00
1079215871 Merge pull request #7859 from german77/battery_again
input_common: Remove battery duplicated struct and update every button press
2022-02-24 11:42:51 -08:00
ca9da569ce Merge pull request #7852 from Morph1984/new-uuid
common: Revise and fix the UUID implementation
2022-02-10 21:52:13 -07:00
6a4ab3e0d2 yuzu: Add auto center on right click 2022-02-06 19:56:03 -06:00
21742f0096 input_common: Remove battery duplicated struct and update every button press 2022-02-06 18:33:55 -06:00
25db62ce15 general: Rename NewUUID to UUID, and remove the previous UUID impl
This completes the removal of the old UUID implementation.
2022-02-05 13:56:21 -05:00
cb30fe50cd input/hid: Migrate to the new UUID implementation 2022-02-05 13:18:41 -05:00
064aa3de11 yuzu: ui: Improve battery symbols 2022-02-02 13:18:06 -06:00
fd1cef5616 input_common: Add DS5 to HD rumble list 2022-01-26 21:49:32 -06:00
92d676d788 Xbox controller default name nit pick
Discord User moon lacer pointed us that official name is 'Xbox' not 'XBox'
2022-01-16 05:59:31 +09:00
7978ea4e8c Change default name for ps controllers
Minor nitpick
Code is from narr
2022-01-15 10:29:42 +09:00
72c8a94a6c yuzu: Add controller hotkeys 2022-01-06 21:26:05 -06:00
ac0c5be7c0 Merge pull request #7577 from v1993/patch-2
input/SDL: Update SDL hints
2021-12-14 10:12:17 -06:00
7f965172c5 input/SDL: Update SDL hints
SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED is no longer needed thanks to new default in SDL 2.0.18.
SDL_HINT_JOYSTICK_HIDAPI_XBOX is reported to cause conflicts with native driver Xbox driver on Linux, and Xbox controllers don't benefit from hidapi anyways.
2021-12-14 15:02:03 +03:00
755822ceec input_engine: Take BasicMotion by const reference with SetMotion() and TriggerOnMotionChange()
Copies the BasicMotion instance once instead of twice.
2021-12-13 09:57:39 -05:00
38f3442ea5 input_engine: Pass VibrationStatus by const reference in SetRumble()
Avoids creating copies of the struct where not necessary.
2021-12-13 09:16:10 -05:00
2b92d22bda input_engine: std::move engine name where applicable
We can allow the name to be moved into, allowing allocations to be
avoided.
2021-12-13 09:05:50 -05:00
e4492a9a82 input_common: Fix error with thread name 2021-11-29 22:03:47 -05:00
746c85b560 input_common: Move button names to the frontend 2021-11-24 20:30:28 -06:00
c4760489a0 input_common: Fix SDL controller with inverted axis 2021-11-24 20:30:28 -06:00