Răsfoiți Sursa

Fixed bug 2873 - Joystick test won't reload after reattach

lectem

-plug in the joystick
-start testjoystick 0
-unplug
-replug

The joystick is detected but doesn't enter the loop anymore since done==SDL_TRUE
Philipp Wiesemann 10 ani în urmă
părinte
comite
39c41bb952
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      test/testjoystick.c

+ 1 - 1
test/testjoystick.c

@@ -176,7 +176,7 @@ WatchJoystick(SDL_Joystick * joystick)
 {
     SDL_Window *window = NULL;
     const char *name = NULL;
-
+    done = SDL_FALSE;
 
     /* Create a window to display joystick axis position */
     window = SDL_CreateWindow("Joystick Test", SDL_WINDOWPOS_CENTERED,