Browse Source

Fill the correct member with the joystick ID in SDL_EVENT_JOYSTICK_UPDATE_COMPLETE

Sam Lantinga 2 years ago
parent
commit
463c456b98
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/joystick/SDL_joystick.c

+ 1 - 1
src/joystick/SDL_joystick.c

@@ -1953,7 +1953,7 @@ void SDL_UpdateJoysticks(void)
 
 
                 event.type = SDL_EVENT_JOYSTICK_UPDATE_COMPLETE;
                 event.type = SDL_EVENT_JOYSTICK_UPDATE_COMPLETE;
                 event.common.timestamp = joystick->update_complete;
                 event.common.timestamp = joystick->update_complete;
-                event.gdevice.which = joystick->instance_id;
+                event.jdevice.which = joystick->instance_id;
                 SDL_PushEvent(&event);
                 SDL_PushEvent(&event);
 
 
                 joystick->update_complete = 0;
                 joystick->update_complete = 0;