Cap the attached gamepad mask at the maximum gamepad count

This commit is contained in:
Cameron Gutman committed 2026-11-15 01:03:26 -06:00
1 parent dab3e23cc4
commit 28629dc17f
1 file changed
+1 -1
+1 -1
View File
@@ -1059,7 +1059,7 @@ int SdlInputHandler::getAttachedGamepadMask()
SDL_JoystickGetGUIDString(SDL_JoystickGetDeviceGUID(i),
guidStr, sizeof(guidStr));
if (!m_IgnoreDeviceGuids.contains(guidStr, Qt::CaseInsensitive))
if (!m_IgnoreDeviceGuids.contains(guidStr, Qt::CaseInsensitive) && count < MAX_GAMEPADS)
{
mask |= (1 << count++);
}