diff --git a/src/ds/ds.c b/src/ds/ds.c index 6e38d668d..ab38cd06b 100644 --- a/src/ds/ds.c +++ b/src/ds/ds.c @@ -436,6 +436,10 @@ static void DSProcessEvents(struct DSCommon* dscore) { } while (ds->cpuBlocked && !ds->earlyExit); cpu->nextEvent = nextEvent; + if (ds->earlyExit) { + break; + } + if (cpu->halted) { cpu->cycles = nextEvent; } @@ -444,9 +448,6 @@ static void DSProcessEvents(struct DSCommon* dscore) { mLOG(DS, FATAL, "Negative cycles will pass: %i", nextEvent); } #endif - if (ds->earlyExit) { - break; - } } ds->earlyExit = false; if (ds->cpuBlocked) {