citra/src
Vitor K ce16653cc8
Automatic Controller Binding (#5100)
* Implement the basics of controller auto mapping. From testing doesn't currenlty work.
Opening the controller requires the device index, but it is only known and guaranteed
at boot time or when a controller is connected.

* Use the SDL_INIT_GAMECONTROLLER flag to initialize the controller
subsystem. It automatically initializes the joystick subsystem too,
so SDL_INIT_JOYSTICK is not needed.

* Implement the SDLGameController class to handle open game controllers.
Based on the SDLJoystick implementation.

* Address review comments

* Changes SDLJoystick and SDLGameController to use a custom default
constructible destructor, to improve readability. The only deleters
used previously were SDL_JoystickClose and SDL_GameControllerClose,
respectively, plus null lambdas. Given that both SDL functions
accept null pointers with just an early return, this should be
functionally the same.
with just an early return

* warn the user when a controller mapping is not found

* Get axis direction and threshold from SDL_ExtendedGameControllerBind

* Reject analog bind if it's not axis, for the couple of examples present in SDL2.0.10's db.
Also add SDL_CONTROLLER_BINDTYPE_NONE for the button bind switch, with a better log message.

* sdl_impl.cpp: Log the error returned by SDL_GetError upon failure to open joystick

* sdl: only use extended binding on SDL2.0.6 and up

* sdl_impl.cpp: minor changes
2021-01-01 10:01:07 +01:00
..
android Update Gradle 2020-12-29 13:29:02 -06:00
audio_core Merge generic part of Android microphone changes (#5624) 2020-12-30 19:21:03 -05:00
citra Fix fmt crash from deprecated percent specifier (#5616) 2020-11-22 20:55:45 -05:00
citra_qt Automatic Controller Binding (#5100) 2021-01-01 10:01:07 +01:00
common Revert #5530 "Port yuzu-emu/yuzu#4539" 2020-12-30 14:49:40 -03:00
core Merge generic part of Android microphone changes (#5624) 2020-12-30 19:21:03 -05:00
dedicated_room Fix: fatal error CVT1100 when compiling manifest file (#5322) 2020-06-20 13:50:33 -05:00
input_common Automatic Controller Binding (#5100) 2021-01-01 10:01:07 +01:00
network Merge branch 'master' into feature/savestates-2 2020-04-16 19:03:49 +01:00
tests tests: Fix warning about comparison between signed and unsigned (#5632) 2020-12-05 22:20:50 +01:00
video_core Use alternate-form formatting for floats after fmt 7.1.2 update (#5654) 2020-12-28 18:32:36 -05:00
web_service HTTP_C::Implement Context::MakeRequest (#4754) 2020-02-21 19:04:04 +01:00
.clang-format add java to .clang-format 2019-02-22 16:29:19 -06:00
CMakeLists.txt Use GitHub Actions as CI service (#5602) 2020-11-12 06:21:35 +01:00