Przeglądaj źródła

Check to see if joysticks are actually initialized in SDL_UpdateJoysticks()

Fixes https://github.com/libsdl-org/SDL/issues/14362

(cherry picked from commit c21b7f8cb84c43955c83cbd25528861a29f112be)
Sam Lantinga 4 miesięcy temu
rodzic
commit
70b12c1b1b
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/joystick/SDL_joystick.c

+ 1 - 1
src/joystick/SDL_joystick.c

@@ -2502,7 +2502,7 @@ void SDL_UpdateJoysticks(void)
     Uint64 now;
     Uint64 now;
     SDL_Joystick *joystick;
     SDL_Joystick *joystick;
 
 
-    if (!SDL_WasInit(SDL_INIT_JOYSTICK)) {
+    if (!SDL_joysticks_initialized) {
         return;
         return;
     }
     }