Added SDL hints to filter the set of game controllers reported by SDL
This commit is contained in:
parent
5c88b8141c
commit
b044a3bba8
8 changed files with 248 additions and 42 deletions
|
@ -251,6 +251,12 @@ AddXInputDevice(Uint8 userid, BYTE SubType, JoyStick_DeviceData **pContext)
|
|||
}
|
||||
pNewJoystick->SubType = SubType;
|
||||
pNewJoystick->XInputUserId = userid;
|
||||
|
||||
if (SDL_ShouldIgnoreGameController(pNewJoystick->joystickname, pNewJoystick->guid)) {
|
||||
SDL_free(pNewJoystick);
|
||||
return;
|
||||
}
|
||||
|
||||
SDL_SYS_AddJoystickDevice(pNewJoystick);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue