summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/input/input_sdl.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2023-01-13 07:06:40 +1100
committer Vas Crabb <vas@vastheman.com>2023-01-13 07:06:40 +1100
commit0f8f80cea9b845703395693748fd4222b7076dae (patch)
treedfae4e486caa14ff30aa2da243ab1d87a3bd18b2 /src/osd/modules/input/input_sdl.cpp
parentcea727b85aeb4abde83b9b7a555f9d6397f5f1e9 (diff)
osd: Fixed names of DualSense controller buttons with SDL Game Controller provider.
Diffstat (limited to 'src/osd/modules/input/input_sdl.cpp')
-rw-r--r--src/osd/modules/input/input_sdl.cpp33
1 files changed, 30 insertions, 3 deletions
diff --git a/src/osd/modules/input/input_sdl.cpp b/src/osd/modules/input/input_sdl.cpp
index 4aedcda3a38..bc29d6246f0 100644
--- a/src/osd/modules/input/input_sdl.cpp
+++ b/src/osd/modules/input/input_sdl.cpp
@@ -138,7 +138,7 @@ char const *const CONTROLLER_BUTTON_XBOX360[]{
"D-pad Down",
"D-pad Left",
"D-pad Right",
- "Microphone",
+ "Mute",
"P1",
"P2",
"P3",
@@ -161,7 +161,30 @@ char const *const CONTROLLER_BUTTON_XBOX360[]{
"D-pad Down",
"D-pad Left",
"D-pad Right",
- "Microphone",
+ "Mute",
+ "P1",
+ "P2",
+ "P3",
+ "P4",
+ "Touchpad" };
+
+[[maybe_unused]] char const *const CONTROLLER_BUTTON_PS5[]{
+ "Cross",
+ "Circle",
+ "Square",
+ "Triangle",
+ "Create",
+ "PS",
+ "Options",
+ "L3",
+ "R3",
+ "L1",
+ "R1",
+ "D-pad Up",
+ "D-pad Down",
+ "D-pad Left",
+ "D-pad Right",
+ "Mute",
"P1",
"P2",
"P3",
@@ -1149,7 +1172,11 @@ public:
break;
#if SDL_VERSION_ATLEAST(2, 0, 14) // TODO: support more controller types
//case SDL_CONTROLLER_TYPE_VIRTUAL:
- //case SDL_CONTROLLER_TYPE_PS5:
+ case SDL_CONTROLLER_TYPE_PS5:
+ osd_printf_verbose("Game Controller: ... PlayStation 5 type\n");
+ axisnames = CONTROLLER_AXIS_PS;
+ buttonnames = CONTROLLER_BUTTON_PS5;
+ break;
//case SDL_CONTROLLER_TYPE_AMAZON_LUNA:
//case SDL_CONTROLLER_TYPE_GOOGLE_STADIA:
//case SDL_CONTROLLER_TYPE_SWITCH_JOYCON_LEFT: