Commit graph

57 commits

Author SHA1 Message Date
german77
6788dffa53 core: hid: Split SL and SR buttons 2023-11-11 21:03:15 -06:00
Martino Fontana
ef46437605 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
liamwhite
f91cc2c72f Merge pull request #10679 from zeltermann/wakelock-reason
Only use SDL wakelock on Linux
2023-06-27 11:21:20 -04:00
german77
b16b2a486b input_common: Make use of new SDL features 2023-06-24 17:42:56 -06:00
zeltermann
377ffa277c 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
marius david
f5827baefe Improve emulation of HD Rumble 2023-05-05 19:30:40 +02:00
german77
59f50daf74 input_common: sdl: Only send last vibration command 2023-03-12 21:30:02 -06:00
Liam
5be8a74b0c general: fix spelling mistakes 2023-03-12 11:33:01 -04:00
arades79
60a68839ee 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
arades79
adcef452e0 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
Narr the Reg
75039440f3 input_common: Reintroduce custom pro controller support 2023-02-09 20:08:54 -06:00
liamwhite
6c7db928fd Merge pull request #9492 from german77/joycon_release
Input_common: Implement custom joycon driver v2
2023-01-24 09:29:37 -05:00
german77
13ccfd78bd input_common: Address byte review 2023-01-20 00:51:45 -06:00
german77
21a62d4752 input_common: Drop Pro controller support from custom driver 2023-01-19 18:05:22 -06:00
german77
5cbeb6f1c4 input_common: Use DriverResult on all engines 2023-01-19 18:05:22 -06:00
Narr the Reg
216bdb7884 input_common: Disable SDL driver with switch controllers 2023-01-19 18:05:20 -06:00
german77
924d8bf7cc input_common: reset sdl motion if data is invalid 2023-01-18 10:05:55 -06:00
Narr the Reg
0476f77e9c input_common: Filter SDL GUID 2022-12-12 10:37:55 -06:00
german77
cddbfe5e67 input_common: Pump sdl events from main thread 2022-11-27 11:09:40 -06:00
liamwhite
f25243fd9d Merge pull request #9107 from german77/gidoly_rules
input_common: cache vibration tests
2022-10-25 12:13:18 -04:00
Morph
9fba74d245 general: Enforce C4800 everywhere except in video_core 2022-10-22 15:02:04 -04:00
german77
96881efdc3 input_common: cache vibration tests 2022-10-21 00:24:08 -05:00
Liam
47fc168030 common: remove "yuzu:" prefix from thread names 2022-10-03 18:43:56 -04:00
Narr the Reg
2d6690468b input_common: sdl: Always check for motion on reconnect 2022-09-03 17:52:57 -05:00
Andrea Pappacoda
6a2efdda2f 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 b2eb103829
2022-07-27 12:53:49 +02:00
german77
93cbaeb605 input_common: sdl: lower vibration frequency and use it's own unique thread 2022-06-28 19:22:16 -05:00
Narr the Reg
d061038994 input_common: Replace usage of string guid to common uuid 2022-06-06 19:56:37 -05:00
Narr the Reg
3cd7b067e0 input_common: Make vibration request async 2022-05-23 12:25:02 -05:00
bunnei
e72179e9fd Merge pull request #7978 from german77/sideway
input_common: Map sticks correctly when mapped sideways
2022-04-21 22:21:59 -07:00
Merry
b02d74d113 input_common: Replace lock_guard with scoped_lock 2022-04-07 19:44:07 +01:00
Narr the Reg
f27e097244 input_common: Map sticks correctly when mapped sideways 2022-03-21 19:39:33 -06:00
bunnei
8c3f50e6bc 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
bunnei
fa8505dfbb Merge pull request #7852 from Morph1984/new-uuid
common: Revise and fix the UUID implementation
2022-02-10 21:52:13 -07:00
german77
2ea4a2b74e yuzu: Add auto center on right click 2022-02-06 19:56:03 -06:00
german77
75d96d5462 input_common: Remove battery duplicated struct and update every button press 2022-02-06 18:33:55 -06:00
Morph
e47b5e6a26 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
Morph
51c445f7e8 input/hid: Migrate to the new UUID implementation 2022-02-05 13:18:41 -05:00
Narr the Reg
2198237e42 yuzu: ui: Improve battery symbols 2022-02-02 13:18:06 -06:00
Narr the Reg
9ea465d958 input_common: Add DS5 to HD rumble list 2022-01-26 21:49:32 -06:00
gidoly
3465aa5d57 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
gidoly
ede1976820 Change default name for ps controllers
Minor nitpick
Code is from narr
2022-01-15 10:29:42 +09:00
german77
353317f31e yuzu: Add controller hotkeys 2022-01-06 21:26:05 -06:00
Narr the Reg
a980d24a54 Merge pull request #7577 from v1993/patch-2
input/SDL: Update SDL hints
2021-12-14 10:12:17 -06:00
Valeri
af37388ee5 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
Lioncash
190cfc5997 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
Lioncash
f41c22d30f 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
Lioncash
54e164d9de 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
Narr the Reg
48537c07cd input_common: Fix error with thread name 2021-11-29 22:03:47 -05:00
german77
b8b849dc2e input_common: Move button names to the frontend 2021-11-24 20:30:28 -06:00
german77
bc9641614d input_common: Fix SDL controller with inverted axis 2021-11-24 20:30:28 -06:00