From be3d961b479da6f1603261b24c91be2067a2a177 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Thu, 17 Oct 2024 08:53:48 -0700
Subject: [PATCH] Treat clicking the right pad as a thumbstick click on a Steam
Controller
---
src/joystick/hidapi/SDL_hidapi_steam.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/joystick/hidapi/SDL_hidapi_steam.c b/src/joystick/hidapi/SDL_hidapi_steam.c
index 5116e84fbeca3..f08586c08c064 100644
--- a/src/joystick/hidapi/SDL_hidapi_steam.c
+++ b/src/joystick/hidapi/SDL_hidapi_steam.c
@@ -1154,6 +1154,9 @@ static bool HIDAPI_DriverSteam_UpdateDevice(SDL_HIDAPI_Device *device)
SDL_SendJoystickButton(timestamp, joystick, SDL_GAMEPAD_BUTTON_STEAM_RIGHT_PADDLE,
((ctx->m_state.ulButtons & STEAM_BUTTON_BACK_RIGHT_MASK) != 0));
+ SDL_SendJoystickButton(timestamp, joystick, SDL_GAMEPAD_BUTTON_RIGHT_STICK,
+ ((ctx->m_state.ulButtons & STEAM_BUTTON_RIGHTPAD_CLICKED_MASK) != 0));
+
if (ctx->m_state.ulButtons & STEAM_DPAD_UP_MASK) {
hat |= SDL_HAT_UP;
}