diff options
author | 2023-01-15 04:51:31 +1100 | |
---|---|---|
committer | 2023-01-15 04:53:36 +1100 | |
commit | c239bc33bdacd2f4e62a7094b6ea8a3276c5c798 (patch) | |
tree | 3db0bbae90d90445842e678a64cf47bd8149b7a9 /src/osd/modules/input/input_sdl.cpp | |
parent | e7e7af0a8037d36a37cb8ddbfab58c2ef00861cd (diff) |
-debugger/win: Cascade positions of new debugger windows.
-osd: Better button names for NVIDIA Shield and Xbox One controllers
with SDL game controller module.
Diffstat (limited to 'src/osd/modules/input/input_sdl.cpp')
-rw-r--r-- | src/osd/modules/input/input_sdl.cpp | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/src/osd/modules/input/input_sdl.cpp b/src/osd/modules/input/input_sdl.cpp index a6ee013ce3c..0f7ece4bdf1 100644 --- a/src/osd/modules/input/input_sdl.cpp +++ b/src/osd/modules/input/input_sdl.cpp @@ -106,7 +106,7 @@ char const *const CONTROLLER_BUTTON_XBOX360[]{ "X", "Y", "View", - "Guide", + "Logo", "Menu", "LSB", "RSB", @@ -238,6 +238,29 @@ char const *const CONTROLLER_BUTTON_XBOX360[]{ "P4", "Touchpad" }; +[[maybe_unused]] char const *const CONTROLLER_BUTTON_SHIELD[]{ + "A", + "B", + "X", + "Y", + "Back", + "Logo", + "Start", + "LSB", + "RSB", + "LB", + "RB", + "D-pad Up", + "D-pad Down", + "D-pad Left", + "D-pad Right", + "Share", + "P1", + "P2", + "P3", + "P4", + "Touchpad" }; + struct key_lookup_table { int code; @@ -1215,6 +1238,11 @@ public: break; #endif #if SDL_VERSION_ATLEAST(2, 24, 0) + case SDL_CONTROLLER_TYPE_NVIDIA_SHIELD: + osd_printf_verbose("Game Controller: ... NVIDIA Shield type\n"); + axisnames = CONTROLLER_AXIS_XBOX; + buttonnames = CONTROLLER_BUTTON_SHIELD; + break; //case SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_LEFT: //case SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT: case SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_PAIR: |