mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-26 21:10:42 +00:00
main-loop: Fix QEMU serial debugging on Windows
This commit is contained in:
parent
c2031108c5
commit
940bee452c
@ -110,7 +110,7 @@ int win_chr_serial_init(Chardev *chr, const char *filename, Error **errp)
|
||||
size = sizeof(COMMCONFIG);
|
||||
GetDefaultCommConfig(filename, &comcfg, &size);
|
||||
comcfg.dcb.DCBlength = sizeof(DCB);
|
||||
CommConfigDialog(filename, NULL, &comcfg);
|
||||
comcfg.dcb.BaudRate = CBR_115200;
|
||||
|
||||
if (!SetCommState(s->file, &comcfg.dcb)) {
|
||||
error_setg(errp, "Failed SetCommState");
|
||||
|
@ -490,16 +490,6 @@ static int os_host_main_loop_wait(int64_t timeout)
|
||||
|
||||
g_main_context_acquire(context);
|
||||
|
||||
/* XXX: need to suppress polling by better using win32 events */
|
||||
ret = 0;
|
||||
for (pe = first_polling_entry; pe != NULL; pe = pe->next) {
|
||||
ret |= pe->func(pe->opaque);
|
||||
}
|
||||
if (ret != 0) {
|
||||
g_main_context_release(context);
|
||||
return ret;
|
||||
}
|
||||
|
||||
FD_ZERO(&rfds);
|
||||
FD_ZERO(&wfds);
|
||||
FD_ZERO(&xfds);
|
||||
@ -562,7 +552,17 @@ static int os_host_main_loop_wait(int64_t timeout)
|
||||
g_main_context_dispatch(context);
|
||||
}
|
||||
|
||||
/* XXX: need to suppress polling by better using win32 events */
|
||||
ret = 0;
|
||||
for (pe = first_polling_entry; pe != NULL; pe = pe->next) {
|
||||
ret |= pe->func(pe->opaque);
|
||||
}
|
||||
|
||||
g_main_context_release(context);
|
||||
|
||||
if (ret != 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
return select_ret || g_poll_ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user