mirror of https://github.com/libsdl-org/SDL.git
Fixed thread-safety warning
This commit is contained in:
parent
ee806597b9
commit
0f80d47bbd
|
|
@ -663,6 +663,8 @@ static void HIDAPI_UpdateJoystickSerial(SDL_HIDAPI_Device *device)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
SDL_AssertJoysticksLocked();
|
||||||
|
|
||||||
for (i = 0; i < device->num_joysticks; ++i) {
|
for (i = 0; i < device->num_joysticks; ++i) {
|
||||||
SDL_Joystick *joystick = SDL_GetJoystickFromInstanceID(device->joysticks[i]);
|
SDL_Joystick *joystick = SDL_GetJoystickFromInstanceID(device->joysticks[i]);
|
||||||
if (joystick && device->serial) {
|
if (joystick && device->serial) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue