mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-06 07:20:48 +00:00
Make sure we completely unlock joysticks when opening HIDAPI devices
Also lock the joysticks when adding and removing Android joysticks
This commit is contained in:
parent
47ba997f06
commit
333935ff3f
4 changed files with 47 additions and 16 deletions
|
@ -168,10 +168,16 @@ SDL_UnlockJoysticks(void)
|
|||
}
|
||||
}
|
||||
|
||||
SDL_bool
|
||||
SDL_JoysticksLocked(void)
|
||||
{
|
||||
return (SDL_joysticks_locked > 0) ? SDL_TRUE : SDL_FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
SDL_AssertJoysticksLocked(void)
|
||||
{
|
||||
SDL_assert(SDL_joysticks_locked > 0);
|
||||
SDL_assert(SDL_JoysticksLocked());
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue