running flag tweak
This commit is contained in:
parent
c85f6cbf7e
commit
3cd9051824
1 changed files with 5 additions and 5 deletions
10
main.cpp
10
main.cpp
|
@ -199,14 +199,16 @@ int main(int argc, char *argv[])
|
|||
else {
|
||||
c->emulation_start(); // for statistics
|
||||
|
||||
*running = true;
|
||||
|
||||
for(;;) {
|
||||
while(!event) {
|
||||
*running = true;
|
||||
|
||||
while(event == EVENT_NONE) {
|
||||
c->step_a();
|
||||
c->step_b();
|
||||
}
|
||||
|
||||
*running = false;
|
||||
|
||||
uint32_t stop_event = event.exchange(EVENT_NONE);
|
||||
|
||||
if (stop_event == EVENT_HALT || stop_event == EVENT_INTERRUPT || stop_event == EVENT_TERMINATE)
|
||||
|
@ -216,8 +218,6 @@ int main(int argc, char *argv[])
|
|||
auto stats = c->get_mips_rel_speed();
|
||||
|
||||
printf("MIPS: %.2f, running speed: %.2f%%\n", stats.first, stats.second);
|
||||
|
||||
*running = false;
|
||||
}
|
||||
|
||||
event = EVENT_TERMINATE;
|
||||
|
|
Loading…
Add table
Reference in a new issue