mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-12-03 11:41:46 +00:00
Cap the attached gamepad mask at the maximum gamepad count
This commit is contained in:
1 parent
dab3e23cc4
commit
28629dc17f
1 file changed
+1
-1
@@ -1059,7 +1059,7 @@ int SdlInputHandler::getAttachedGamepadMask()
|
|||||||
SDL_JoystickGetGUIDString(SDL_JoystickGetDeviceGUID(i),
|
SDL_JoystickGetGUIDString(SDL_JoystickGetDeviceGUID(i),
|
||||||
guidStr, sizeof(guidStr));
|
guidStr, sizeof(guidStr));
|
||||||
|
|
||||||
if (!m_IgnoreDeviceGuids.contains(guidStr, Qt::CaseInsensitive))
|
if (!m_IgnoreDeviceGuids.contains(guidStr, Qt::CaseInsensitive) && count < MAX_GAMEPADS)
|
||||||
{
|
{
|
||||||
mask |= (1 << count++);
|
mask |= (1 << count++);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user