GBA Memory: Fix prefetch invalidation delay

This commit is contained in:
Jeffrey Pfau 2015-07-01 19:24:15 -07:00
parent 79252c21fc
commit d4ecdfc2ac
1 changed files with 2 additions and 2 deletions

View File

@ -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;