@@ -292,9 +292,9 @@ static void WIIU_VideoQuit(_THIS)
292292 WIIU_VideoData * videodata = (WIIU_VideoData * ) _this -> driverdata ;
293293
294294 if (videodata -> handleProcUI ) {
295- // Put ProcUI into EXIT/shutdown state if user stopped processing events
295+ // Put ProcUI into EXIT state if user stopped processing events
296296 // before SDL_QUIT was generated.
297- if (ProcUIIsRunning () && !ProcUIInShutdown () ) {
297+ if (ProcUIIsRunning () && !videodata -> exitingProcUI ) {
298298 SDL_bool procui_running = SDL_TRUE ;
299299 SYSLaunchMenu ();
300300 while (procui_running ) {
@@ -366,15 +366,15 @@ static void WIIU_PumpEvents(_THIS)
366366{
367367 WIIU_VideoData * videodata = (WIIU_VideoData * ) _this -> driverdata ;
368368
369- if (videodata -> handleProcUI && ! ProcUIInShutdown () ) {
369+ if (videodata -> handleProcUI ) {
370370 if (videodata -> enteringBackground ) {
371371 // The previous ProcUIProcessMessages() received a
372372 // PROCUI_STATUS_RELEASE_FOREGROUND.
373373 videodata -> enteringBackground = SDL_FALSE ;
374374 ProcUIDrawDoneRelease ();
375375 }
376376
377- if (ProcUIIsRunning () && !ProcUIInShutdown () ) {
377+ if (ProcUIIsRunning () && !videodata -> exitingProcUI ) {
378378 ProcUIStatus status = ProcUIProcessMessages (TRUE);
379379 switch (status ) {
380380 case PROCUI_STATUS_IN_FOREGROUND :
@@ -383,7 +383,7 @@ static void WIIU_PumpEvents(_THIS)
383383 case PROCUI_STATUS_IN_BACKGROUND :
384384 break ;
385385 case PROCUI_STATUS_RELEASE_FOREGROUND : {
386- SDL_Window * window = _this -> windows ;
386+ SDL_Window * window = _this -> windows ;
387387 while (window ) {
388388 // No longer in foreground, window is no longer
389389 // visible.
@@ -400,6 +400,7 @@ static void WIIU_PumpEvents(_THIS)
400400 break ;
401401 }
402402 case PROCUI_STATUS_EXITING :
403+ videodata -> exitingProcUI = SDL_TRUE ;
403404 SDL_SendQuit ();
404405 break ;
405406 }
0 commit comments