From 0f8f80cea9b845703395693748fd4222b7076dae Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Fri, 13 Jan 2023 07:06:40 +1100 Subject: osd: Fixed names of DualSense controller buttons with SDL Game Controller provider. --- src/osd/modules/input/input_sdl.cpp | 33 ++++++++++++++++++++++++++++++--- 1 file 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: -- cgit v1.2.3