fix: checking for touchpad on all controllers

This commit is contained in:
2026-09-17 19:13:52 -04:00
parent f85bdd8a45
commit 570752a7a5
2 changed files with 8 additions and 3 deletions
+6 -2
View File
@@ -148,9 +148,13 @@ void CInput::SetJoypadValues(JOYPAD *pThisPad)
pThisPad->m_uiButtons |= _360_JOY_BUTTON_BACK;
}
if (SDL_GetGamepadButton(pGamePad, SDL_GAMEPAD_BUTTON_TOUCHPAD))
//str1k3r - Only check the touchpad if we have one
if (SDL_GetNumGamepadTouchpads(pGamePad) > 0)
{
pThisPad->m_uiButtons |= _PS_JOY_BUTTON_TOUCHPAD;
if (SDL_GetGamepadButton(pGamePad, SDL_GAMEPAD_BUTTON_TOUCHPAD))
{
pThisPad->m_uiButtons |= _PS_JOY_BUTTON_TOUCHPAD;
}
}
if (SDL_GetGamepadButton(pGamePad, SDL_GAMEPAD_BUTTON_LEFT_STICK))