Fix controller number check for adaptive triggers

This commit is contained in:
Cameron Gutman committed 2026-10-24 20:27:07 -05:00
1 parent d606709d83
commit 9fee675c91
1 file changed
+1 -1
+1 -1
View File
@@ -965,7 +965,7 @@ void SdlInputHandler::setAdaptiveTriggers(uint16_t controllerNumber, DualSenseOu
#if SDL_VERSION_ATLEAST(2, 0, 16) #if SDL_VERSION_ATLEAST(2, 0, 16)
// Make sure the controller number is within our supported count // Make sure the controller number is within our supported count
if (controllerNumber <= MAX_GAMEPADS && if (controllerNumber < MAX_GAMEPADS &&
// and we have a valid controller // and we have a valid controller
m_GamepadState[controllerNumber].controller != nullptr && m_GamepadState[controllerNumber].controller != nullptr &&
// and it's a PS5 controller // and it's a PS5 controller