Mercurial > repos > blastem
comparison debug.c @ 2252:6a07b13894f7
Fix input processing while waiting for console input in debugger
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Tue, 29 Nov 2022 21:04:57 -0800 |
parents | 4e27c36f947c |
children | 0343f0d5add0 |
comparison
equal
deleted
inserted
replaced
2251:80dde7fb445b | 2252:6a07b13894f7 |
---|---|
1053 FD_ZERO(&read_fds); | 1053 FD_ZERO(&read_fds); |
1054 struct timeval timeout; | 1054 struct timeval timeout; |
1055 #endif | 1055 #endif |
1056 do { | 1056 do { |
1057 process_events(); | 1057 process_events(); |
1058 render_update_display(); | |
1058 #ifndef _WIN32 | 1059 #ifndef _WIN32 |
1059 timeout.tv_sec = 0; | 1060 timeout.tv_sec = 0; |
1060 timeout.tv_usec = 16667; | 1061 timeout.tv_usec = 16667; |
1061 FD_SET(fileno(stdin), &read_fds); | 1062 FD_SET(fileno(stdin), &read_fds); |
1062 if(select(fileno(stdin) + 1, &read_fds, NULL, NULL, &timeout) >= 1) { | 1063 if(select(fileno(stdin) + 1, &read_fds, NULL, NULL, &timeout) >= 1) { |
1899 for (uint32_t i = 0; i < def->num_labels; i++) | 1900 for (uint32_t i = 0; i < def->num_labels; i++) |
1900 { | 1901 { |
1901 printf("%s:\n", def->labels[i]); | 1902 printf("%s:\n", def->labels[i]); |
1902 } | 1903 } |
1903 } | 1904 } |
1904 | 1905 |
1905 address = m68k_decode(m68k_instruction_fetch, context, &inst, address); | 1906 address = m68k_decode(m68k_instruction_fetch, context, &inst, address); |
1906 m68k_disasm_labels(&inst, disasm_buf, root->disasm); | 1907 m68k_disasm_labels(&inst, disasm_buf, root->disasm); |
1907 printf("\t%s\n", disasm_buf); | 1908 printf("\t%s\n", disasm_buf); |
1908 } while(!m68k_is_terminal(&inst)); | 1909 } while(!m68k_is_terminal(&inst)); |
1909 return 1; | 1910 return 1; |