Fixed thread-safety warning

main
Sam Lantinga 2023-08-25 08:21:54 -07:00
parent ee806597b9
commit 0f80d47bbd
1 changed files with 2 additions and 0 deletions

View File

@ -663,6 +663,8 @@ static void HIDAPI_UpdateJoystickSerial(SDL_HIDAPI_Device *device)
{
int i;
SDL_AssertJoysticksLocked();
for (i = 0; i < device->num_joysticks; ++i) {
SDL_Joystick *joystick = SDL_GetJoystickFromInstanceID(device->joysticks[i]);
if (joystick && device->serial) {