mirror of
https://github.com/digarok/gsplus.git
synced 2024-06-15 10:29:29 +00:00
quit if the HALT_WANTOQUIT is set (ie, win32 closing the window)
This commit is contained in:
parent
87499819e5
commit
f863c4cfa0
|
@ -1186,6 +1186,9 @@ int debug_shell(int code) {
|
|||
char *cp;
|
||||
int control_d_count = 0;
|
||||
|
||||
fflush(stderr);
|
||||
fflush(stdout);
|
||||
|
||||
if (!g_templates_loaded) {
|
||||
char *path;
|
||||
g_templates_loaded = 1;
|
||||
|
@ -1286,6 +1289,8 @@ void do_go() {
|
|||
for(;;) {
|
||||
|
||||
ret = run_prog();
|
||||
if (halt_sim & HALT_WANTTOQUIT) return;
|
||||
|
||||
if (ret || g_stepping) {
|
||||
g_config_control_panel = 1;
|
||||
ok = debug_shell(ret);
|
||||
|
|
|
@ -1613,9 +1613,12 @@ int run_prog() {
|
|||
ret = 0;
|
||||
break;
|
||||
}
|
||||
if(halt_sim & 0x07) {
|
||||
halt_sim &= ~0x07;
|
||||
ret = RET_HALT;
|
||||
if (halt_sim & ~HALT_EVENT) {
|
||||
if(halt_sim & 0x07) {
|
||||
/* halt_printf() */
|
||||
halt_sim &= ~0x07;
|
||||
ret = RET_HALT;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user