File: Fixed-the-paddle-mapping-for-Steam-Controllers.patch

package info (click to toggle)
libsdl3 3.2.26%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 42,540 kB
  • sloc: ansic: 390,896; objc: 12,361; xml: 9,084; cpp: 5,729; perl: 4,589; python: 3,372; sh: 1,032; makefile: 265; cs: 56
file content (25 lines) | stat: -rw-r--r-- 1,215 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From: Sam Lantinga <slouken@libsdl.org>
Date: Sun, 2 Nov 2025 10:06:49 -0800
Subject: Fixed the paddle mapping for Steam Controllers

(cherry picked from commit 3336aa95f12df4f15150e860b310beac55be06a4)

Bug: https://github.com/libsdl-org/SDL/issues/1438
Origin: upstream, 3.2.28, commit:1bfa90cb1f1c80e33ec36c7137009b42152c71f0
---
 src/joystick/SDL_gamepad.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/joystick/SDL_gamepad.c b/src/joystick/SDL_gamepad.c
index 6bd9909..97987ac 100644
--- a/src/joystick/SDL_gamepad.c
+++ b/src/joystick/SDL_gamepad.c
@@ -822,7 +822,7 @@ static GamepadMapping_t *SDL_CreateMappingForHIDAPIGamepad(SDL_GUID guid)
 
         if (SDL_IsJoystickSteamController(vendor, product)) {
             // Steam controllers have 2 back paddle buttons
-            SDL_strlcat(mapping_string, "paddle1:b12,paddle2:b11,", sizeof(mapping_string));
+            SDL_strlcat(mapping_string, "paddle1:b11,paddle2:b12,", sizeof(mapping_string));
         } else if (SDL_IsJoystickNintendoSwitchPro(vendor, product) ||
                    SDL_IsJoystickNintendoSwitchProInputOnly(vendor, product)) {
             // Nintendo Switch Pro controllers have a screenshot button