You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-emulation/uae/files/uae-0.8.25-close_window_hac...

34 lines
971 B

The program did't quit after closing the GUI window with the close button, so
we force the backend to exit, just to make the user happy.
Antonio Ospite <ospite@studenti.unina.it>
diff -bpruN uae-0.8.25/src/gtkui.c uae-0.8.25_patched/src/gtkui.c
--- uae-0.8.25/src/gtkui.c 2006-06-07 17:41:49.000000000 +0200
+++ uae-0.8.25_patched/src/gtkui.c 2006-06-08 22:38:34.000000000 +0200
@@ -557,7 +557,8 @@ static int my_idle (void)
}
}
- if (gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook)) == 0) {
+ int ret = gtk_notebook_get_current_page (GTK_NOTEBOOK (notebook));
+ if (ret == 0) {
for (i = 0; i < 5; i++) {
unsigned int mask = 1 << i;
unsigned int on = leds & mask;
@@ -570,6 +571,14 @@ static int my_idle (void)
}
prevledstate = leds;
}
+
+ /* XXX Ugly hack here:
+ * exit if the gui gives error,
+ * this happens when we close the window.
+ */
+ if (ret < 0)
+ exit(0);
+
out:
return 1;
}