mirror of https://github.com/mgba-emu/mgba.git
DS: Lengthen CPU timeslices if the ARM7 is halted
This commit is contained in:
parent
e4d9ade08e
commit
fdaccc16f1
|
@ -73,6 +73,10 @@ static void _slice(struct mTiming* timing, void* context, uint32_t cyclesLate) {
|
||||||
} else {
|
} else {
|
||||||
ds->activeCpu = ds->ds9.cpu;
|
ds->activeCpu = ds->ds9.cpu;
|
||||||
ds->cycleDrift -= cycles << 1;
|
ds->cycleDrift -= cycles << 1;
|
||||||
|
int32_t nextEvent = mTimingNextEvent(&ds->ds7.timing) << 1;
|
||||||
|
if (!ds->ds7.cpu->halted || nextEvent < SLICE_CYCLES) {
|
||||||
|
nextEvent = SLICE_CYCLES;
|
||||||
|
}
|
||||||
cycles = ds->cycleDrift + SLICE_CYCLES;
|
cycles = ds->cycleDrift + SLICE_CYCLES;
|
||||||
timing = &ds->ds9.timing;
|
timing = &ds->ds9.timing;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue