Fixed infinite recursion in SDL_IsGamepad()
SDL_IsGamepad() calls SDL_GetJoystickTypeForID(), which will call SDL_IsGamepad() if it's not a known controller type. The new code which is breaking was added to prevent Logitech FFB wheels from showing up as gamepads, which we check for separately.
This commit is contained in:
parent
6d0fb0a2e6
commit
5985f0a327
3 changed files with 11 additions and 6 deletions
|
@ -3049,7 +3049,7 @@ bool SDL_IsJoystickVIRTUAL(SDL_GUID guid)
|
|||
return (guid.data[14] == 'v') ? true : false;
|
||||
}
|
||||
|
||||
static bool SDL_IsJoystickWheel(Uint16 vendor_id, Uint16 product_id)
|
||||
bool SDL_IsJoystickWheel(Uint16 vendor_id, Uint16 product_id)
|
||||
{
|
||||
return SDL_VIDPIDInList(vendor_id, product_id, &wheel_devices);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue