Added SDL hints to filter the set of game controllers reported by SDL
This commit is contained in:
parent
dc40018438
commit
c49fa37c5b
8 changed files with 248 additions and 42 deletions
|
@ -233,6 +233,10 @@ IsJoystick(int fd, char *namebuf, const size_t namebuflen, SDL_JoystickGUID *gui
|
|||
SDL_strlcpy((char*)guid16, namebuf, sizeof(guid->data) - 4);
|
||||
}
|
||||
|
||||
if (SDL_IsGameControllerNameAndGUID(namebuf, *guid) &&
|
||||
SDL_ShouldIgnoreGameController(namebuf, *guid)) {
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue