mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-19 01:38:12 +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:
@@ -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());
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user