SDL: Fixed mapping BTN_TR2 to right trigger (a614d)

From a614d8f8f78b5db870e8f45c81e1ab9e54320961 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sat, 8 Jul 2023 18:18:22 -0700
Subject: [PATCH] Fixed mapping BTN_TR2 to right trigger

(cherry picked from commit ea60da5b94ed8ec69aad69ca46e81567ab99ed2a)
(cherry picked from commit 4b1dd54a56236a41e647f129c6018c78499975b3)
---
 src/joystick/linux/SDL_sysjoystick.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/joystick/linux/SDL_sysjoystick.c b/src/joystick/linux/SDL_sysjoystick.c
index e6db86781b72..06f227b67b66 100644
--- a/src/joystick/linux/SDL_sysjoystick.c
+++ b/src/joystick/linux/SDL_sysjoystick.c
@@ -2026,7 +2026,7 @@ static SDL_bool LINUX_JoystickGetGamepadMapping(int device_index, SDL_GamepadMap
 #endif
     }
 
-    if (!(mapped & MAPPED_TRIGGER_LEFT) && joystick->hwdata->has_key[BTN_TR2]) {
+    if (!(mapped & MAPPED_TRIGGER_RIGHT) && joystick->hwdata->has_key[BTN_TR2]) {
         out->righttrigger.kind = EMappingKind_Button;
         out->righttrigger.target = joystick->hwdata->key_map[BTN_TR2];
         mapped |= MAPPED_TRIGGER_RIGHT;