blob: 8607eb79710b87fdbfa3bb09f6f43ce458922888 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
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;
}
|