On the Mac, with the simulator, the simulator doesn't exit when told to.

Turns out there's some code in uisimulator/sdl/uisdl/gui_shutdown()
which hangs waiting for a semaphore to empty, for no particularly good
reason.

The following patch fixes that behavior.

Bill



Index: uisdl.c
===================================================================
RCS file: /cvsroot/rockbox/uisimulator/sdl/uisdl.c,v
retrieving revision 1.9
diff -c -r1.9 uisdl.c
*** uisdl.c     19 Mar 2006 06:59:36 -0000      1.9
--- uisdl.c     18 May 2006 02:21:51 -0000
***************
*** 166,179 ****
  {
      int i;
  
-     SDL_KillThread(gui_thread);
      SDL_RemoveTimer(tick_timer_id);
  
      for (i = 0; i < threadCount; i++)
      {
          SDL_KillThread(threads[i]);
      }
  
      return true;
  }
  
--- 166,184 ----
  {
      int i;
  
      SDL_RemoveTimer(tick_timer_id);
  
+ #ifndef __APPLE__
+ 
+     SDL_KillThread(gui_thread);
+ 
      for (i = 0; i < threadCount; i++)
      {
          SDL_KillThread(threads[i]);
      }
  
+ #endif 
+ 
      return true;
  }
  
***************
*** 237,242 ****
  
      gui_message_loop();
  
!     return gui_shutdown();
  }
  
--- 242,247 ----
  
      gui_message_loop();
  
!     return (gui_shutdown() ? 0 : 1);
  }

Reply via email to