test/testjoystick.c
changeset 9607 7746ab058d12
parent 9433 bd062398b648
child 9619 b94b6d0bff0f
equal deleted inserted replaced
9606:ec24a5add229 9607:7746ab058d12
   173 
   173 
   174         if (SDL_JoystickGetAttached( joystick ) == 0) {
   174         if (SDL_JoystickGetAttached( joystick ) == 0) {
   175             done = SDL_TRUE;
   175             done = SDL_TRUE;
   176             retval = SDL_TRUE;  /* keep going, wait for reattach. */
   176             retval = SDL_TRUE;  /* keep going, wait for reattach. */
   177         }
   177         }
       
   178 
       
   179 #ifdef __EMSCRIPTEN__
       
   180     if (done) {
       
   181         emscripten_cancel_main_loop();
       
   182     }
       
   183 #endif
   178 }
   184 }
   179 
   185 
   180 static SDL_bool
   186 static SDL_bool
   181 WatchJoystick(SDL_Joystick * joystick)
   187 WatchJoystick(SDL_Joystick * joystick)
   182 {
   188 {