Enable debugger gui only if available (wx handling was incorrect).

This commit is contained in:
Volker Ruppert 2024-06-04 20:39:12 +02:00
parent f3e2cbff5c
commit 730fe8e813
2 changed files with 4 additions and 3 deletions

View File

@ -922,11 +922,11 @@ int bx_real_sim_c::configuration_interface(const char *ignore, ci_command_t comm
BX_PANIC(("no configuration interface was loaded"));
return -1;
}
if (!strcmp(registered_ci_name, "wx"))
if (!strcmp(registered_ci_name, "wx")) {
wxsel = 1;
else
} else {
wxsel = 0;
bx_debug_gui = wxsel;
}
if (command == CI_START) {
ci_started = 1;
} else if (command == CI_SHUTDOWN) {

View File

@ -1042,6 +1042,7 @@ void bx_wx_gui_c::specific_init(int argc, char **argv, unsigned headerbar_y)
}
#if BX_DEBUGGER && BX_DEBUGGER_GUI
SIM->set_debug_gui(1);
#ifdef WIN32
// on Windows the debugger gui must run in a separate thread
DWORD threadID;