test/testgamecontroller.c
changeset 9607 7746ab058d12
parent 9340 af5be9462bb4
child 9611 c23b2fa8d4c2
equal deleted inserted replaced
9606:ec24a5add229 9607:7746ab058d12
   151 
   151 
   152     if (!SDL_GameControllerGetAttached(gamecontroller)) {
   152     if (!SDL_GameControllerGetAttached(gamecontroller)) {
   153         done = SDL_TRUE;
   153         done = SDL_TRUE;
   154         retval = SDL_TRUE;  /* keep going, wait for reattach. */
   154         retval = SDL_TRUE;  /* keep going, wait for reattach. */
   155     }
   155     }
       
   156 
       
   157 #ifdef __EMSCRIPTEN__
       
   158     if (done) {
       
   159         emscripten_cancel_main_loop();
       
   160     }
       
   161 #endif
   156 }
   162 }
   157 
   163 
   158 SDL_bool
   164 SDL_bool
   159 WatchGameController(SDL_GameController * gamecontroller)
   165 WatchGameController(SDL_GameController * gamecontroller)
   160 {
   166 {