$OpenBSD: patch-gui_win32_cc,v 1.1 2001/02/02 16:59:10 todd Exp $
--- gui/win32.cc.orig	Sat Mar 25 21:43:36 2000
+++ gui/win32.cc	Fri Oct 20 11:37:48 2000
@@ -157,7 +157,7 @@ static void processMouseXY( int x, int y
   if ( old_bx_state!=mouse_button_state)
   {
     /* Make up for missing message */
-    bx_printf( "&&&missing mouse state change\r\n");
+    bio->printf( "&&&missing mouse state change\r\n");
     EnterCriticalSection( &stInfo.keyCS);
     enq_mouse_event();
     mouse_button_state=old_bx_state;
@@ -204,6 +204,12 @@ static void cursorWarped()
 // GUI thread must be dead/done in order to call terminateEmul
 void terminateEmul(int reason) {
 
+// if not using debugger, then we can take control of SIGINT.
+// If using debugger, it needs control of this.
+#if BX_DEBUGGER==0
+  signal(SIGINT, bx_signal_handler);
+#endif
+
   // We know that Critical Sections were inited when x_tilesize has been set
   // See bx_gui_c::specific_init
   if (x_tilesize != 0) {
@@ -222,16 +228,16 @@ void terminateEmul(int reason) {
 
   switch (reason) {
   case EXIT_GUI_SHUTDOWN:
-    bx_panic("Window closed, exiting!\n");
+    bio->panic("Window closed, exiting!\n");
     break;
   case EXIT_GMH_FAILURE:
-    bx_panic("GetModuleHandle failure!\n");
+    bio->panic("GetModuleHandle failure!\n");
     break;
   case EXIT_FONT_BITMAP_ERROR:
-    bx_panic("Font bitmap creation failure!\n");
+    bio->panic("Font bitmap creation failure!\n");
     break;
   case EXIT_HEADER_BITMAP_ERROR:
-    bx_panic("Header bitmap creation failure!\n");
+    bio->panic("Header bitmap creation failure!\n");
     break;
   case EXIT_NORMAL:
     break;
