aboutsummaryrefslogtreecommitdiff
path: root/src/input_common/drivers/sdl_driver.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [hid_core, input_common] use std::numbers::pi{_v} instead of re-defining (#4160)lizzie2026-07-071-3/+5
| | | | | | | | | | don't reinvent the wheel, simple as that. Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4160 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
* [input_common] Fix GetButtonMappingForDevice() when joystick doesn't have a ↵lizzie2026-07-071-19/+24
| | | | | | | | | | | | | | | | gamepad associated with it (#4172) from PS4 PR - this should help fix the case where a controller doesn't have an associated gamepad and thus its not automatically configured. this should fix that :) Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4172 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
* [externals] Update to SDL3 (#3952)Kaydax2026-05-181-165/+315
| | | | | | | | | | | | | | | | | | | | Since the launch of the steam controller I think it's only best to push towards updating to SDL3 allowing for a wider range of controller support I went ahead and started on getting it working. Everything here should be functional, I've personally tested it all on Arch Linux. Still untested on windows, so looking for feedback on that Any feedback and help would be appreciated! Main changes: - Bump everything to SDL3 - Handle SDL3 audio and input - Add steam controller support, including HD Rumble - Improved battery reporting via the status icon by using real % rather than state alone Co-authored-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3952 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: Lizzie <lizzie@eden-emu.dev>
* [common/logging] Simplify logging logic and fix issues when logging before ↵lizzie2026-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | system is created (#3688) - our logging code was bigger than spdlog itself, why???? just keep it simple - fix issues when logging before logging system is even started - removes the "initialized logging twice" issue - removes uneeded indirection in file logging - uses direct formatting instead of jumping hoopla-around the fmt::format() ressult - code duplication and dead code removal as usual I did explore dup2() but I think it's not worth the hassle I did try `fwopen()` but it's better if things are just kept as-is. there is a lot of noise because I removed a bunch of redundant files on logging and just put everything in one file now normally this wouldn't be a good idea, however consider: the complexity of logging; it's less than 500 lines... does it really need a whole subsystem?!?!?! ITS JUST LOGGING Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3688 Reviewed-by: crueter <crueter@eden-emu.dev> Reviewed-by: DraVee <chimera@dravee.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [*] change all std::unordered_map and std::unordered_set into ↵lizzie2026-02-101-2/+2
| | | | | | | | | | | | | | | | | | | ankerl::unordered_dense::map/set variants (#3442) mainly doing this to reduce memory footprint; we all know how nice ankerl::unordered_dense is in theory 4x faster - in practice these maps arent that "hot" anyways so not likely to have much perf gained i just want to reduce mem fragmentation to ease my porting process, plus it helps other platforms as well (ahem weak Mediatek devices) :) Signed-off-by: lizzie <lizzie@eden-emu.dev> Co-authored-by: Caio Oliveira <caiooliveirafarias0@gmail.com> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3442 Reviewed-by: DraVee <dravee@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [input_common] fix xinput raw not working on sdl2 (#3305)lizzie2026-01-161-4/+2
| | | | | | | | | | | this should fix issue where you couldn't connect more than 4 controllers at once Signed-off-by: lizzie <lizzie@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3305 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [input_common/mouse, sdl_driver] increase latency of mouse and SDL_vibration ↵lizzie2025-12-041-1/+1
| | | | | | | | | | | | | | threads to 4 "evals" per sec (#2982) No need to have those nano-sleeps for these threads... Signed-off-by: lizzie lizzie@eden-emu.dev Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2982 Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com> Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [cmake] enable clang-cl and WoA builds (#348)lizzie2025-09-091-2/+2
| | | | | | | | | | | | | | Compilation and CMake fixes for both Windows on ARM and clang-cl, meaning Windows can now be built on both MSVC and clang on both amd64 and aarch64. Compiling on clang is *dramatically* faster so this should be useful for CI. Co-authored-by: crueter <crueter@eden-emu.dev> Co-authored-by: crueter <crueter@crueter.xyz> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/348 Reviewed-by: CamilleLaVey <camillelavey99@gmail.com> Reviewed-by: crueter <crueter@eden-emu.dev> Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [icc] fix intel c++ compiler errors (#146)lizzie2025-07-301-6/+8
| | | | | | Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/146 Co-authored-by: lizzie <lizzie@eden-emu.dev> Co-committed-by: lizzie <lizzie@eden-emu.dev>
* [desktop, core] yuzu -> Eden, eden -> Edencrueter2025-07-191-1/+1
| | | | Signed-off-by: crueter <crueter@eden-emu.dev>
* core: hid: Split SL and SR buttonsgerman772023-11-111-8/+12
|
* input_common: set `SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS` to 0Martino Fontana2023-07-071-37/+9
| | | | | | | 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 https://github.com/libsdl-org/SDL/blob/92b3c53c92971e685254fd89f89ce6bde8cea60e/include/SDL_hints.h#L512-L532)
* Merge pull request #10679 from zeltermann/wakelock-reasonliamwhite2023-06-271-0/+4
|\ | | | | Only use SDL wakelock on Linux
| * Only use SDL wakelock on Linuxzeltermann2023-06-241-0/+4
| | | | | | | | | | | | 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.
* | input_common: Make use of new SDL featuresgerman772023-06-241-8/+20
|/
* Improve emulation of HD Rumblemarius david2023-05-051-6/+29
|
* input_common: sdl: Only send last vibration commandgerman772023-03-121-1/+16
|
* general: fix spelling mistakesLiam2023-03-121-2/+2
|
* remove static from pointer sized or smaller types for aesthetics, change ↵arades792023-02-141-4/+4
| | | | | | constexpr static to static constexpr for consistency Signed-off-by: arades79 <scravers@protonmail.com>
* add static lifetime to constexpr values to force compile time evaluation ↵arades792023-02-141-4/+4
| | | | | | where possible Signed-off-by: arades79 <scravers@protonmail.com>
* input_common: Reintroduce custom pro controller supportNarr the Reg2023-02-091-2/+16
|
* Merge pull request #9492 from german77/joycon_releaseliamwhite2023-01-241-5/+18
|\ | | | | Input_common: Implement custom joycon driver v2
| * input_common: Address byte reviewgerman772023-01-201-1/+1
| |
| * input_common: Drop Pro controller support from custom drivergerman772023-01-191-3/+3
| |
| * input_common: Use DriverResult on all enginesgerman772023-01-191-2/+2
| |
| * input_common: Disable SDL driver with switch controllersNarr the Reg2023-01-191-3/+16
| |
* | input_common: reset sdl motion if data is invalidgerman772023-01-181-19/+35
|/
* input_common: Filter SDL GUIDNarr the Reg2022-12-121-0/+2
|
* input_common: Pump sdl events from main threadgerman772022-11-271-9/+6
|
* Merge pull request #9107 from german77/gidoly_rulesliamwhite2022-10-251-8/+56
|\ | | | | input_common: cache vibration tests
| * input_common: cache vibration testsgerman772022-10-211-8/+56
| |
* | general: Enforce C4800 everywhere except in video_coreMorph2022-10-221-2/+2
|/
* common: remove "yuzu:" prefix from thread namesLiam2022-10-031-2/+2
|
* input_common: sdl: Always check for motion on reconnectNarr the Reg2022-09-031-4/+7
|
* chore: make yuzu REUSE compliantAndrea Pappacoda2022-07-271-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [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 b2eb10382941bef0914f4a0a4685b9033440aa9f
* input_common: sdl: lower vibration frequency and use it's own unique threadgerman772022-06-281-1/+9
|
* input_common: Replace usage of string guid to common uuidNarr the Reg2022-06-061-26/+30
|
* input_common: Make vibration request asyncNarr the Reg2022-05-231-2/+21
|
* Merge pull request #7978 from german77/sidewaybunnei2022-04-211-0/+33
|\ | | | | input_common: Map sticks correctly when mapped sideways
| * input_common: Map sticks correctly when mapped sidewaysNarr the Reg2022-03-211-0/+33
| |
* | input_common: Replace lock_guard with scoped_lockMerry2022-04-071-6/+6
|/
* Merge pull request #7859 from german77/battery_againbunnei2022-02-241-7/+10
|\ | | | | input_common: Remove battery duplicated struct and update every button press
| * input_common: Remove battery duplicated struct and update every button pressgerman772022-02-061-7/+10
| |
* | Merge pull request #7852 from Morph1984/new-uuidbunnei2022-02-101-2/+2
|\ \ | | | | | | common: Revise and fix the UUID implementation
| * | general: Rename NewUUID to UUID, and remove the previous UUID implMorph2022-02-051-1/+1
| | | | | | | | | | | | This completes the removal of the old UUID implementation.
| * | input/hid: Migrate to the new UUID implementationMorph2022-02-051-3/+3
| |/
* / yuzu: Add auto center on right clickgerman772022-02-061-3/+3
|/
* yuzu: ui: Improve battery symbolsNarr the Reg2022-02-021-3/+2
|
* input_common: Add DS5 to HD rumble listNarr the Reg2022-01-261-2/+3
|
* Xbox controller default name nit pickgidoly2022-01-161-2/+2
| | | Discord User moon lacer pointed us that official name is 'Xbox' not 'XBox'