mirror of https://github.com/mgba-emu/mgba.git
GBA Memory: Fix prefetch invalidation delay
This commit is contained in:
parent
79252c21fc
commit
d4ecdfc2ac
|
@ -1566,8 +1566,8 @@ void GBAMemoryInvalidatePrefetch(struct GBA* gba) {
|
|||
int32_t toRemove = (s - 1) * loads + n2s * nWaits + diff;
|
||||
if (toRemove > gba->cpu->cycles) {
|
||||
// We have to delay invalidating...
|
||||
gba->memory.prefetchCycles = gba->memory.prefetchCycles;
|
||||
gba->memory.prefetchStalls = gba->memory.prefetchStalls;
|
||||
gba->memory.prefetchCycles = waited;
|
||||
gba->memory.prefetchStalls = nWaits;
|
||||
return;
|
||||
}
|
||||
gba->cpu->cycles -= toRemove;
|
||||
|
|
Loading…
Reference in New Issue