GBA Savedata: Fix savedata sync timer

This commit is contained in:
Jeffrey Pfau 2016-09-14 17:45:58 -07:00
parent f97a1524be
commit 61800d0e9b
2 changed files with 2 additions and 1 deletions

View File

@ -41,6 +41,7 @@ Bugfixes:
- GBA Memory: Fix ldm {pc} - GBA Memory: Fix ldm {pc}
- GBA Video: Fix out-of-order OBJWIN - GBA Video: Fix out-of-order OBJWIN
- GBA: Count up timers should not count themselves - GBA: Count up timers should not count themselves
- GBA Savedata: Fix savedata sync timer
Misc: Misc:
- 3DS: Use blip_add_delta_fast for a small speed improvement - 3DS: Use blip_add_delta_fast for a small speed improvement
- OpenGL: Log shader compilation failure - OpenGL: Log shader compilation failure

View File

@ -482,9 +482,9 @@ void GBASavedataClean(struct GBASavedata* savedata, uint32_t frameCount) {
return; return;
} }
if (savedata->dirty & SAVEDATA_DIRT_NEW) { if (savedata->dirty & SAVEDATA_DIRT_NEW) {
savedata->dirtAge = frameCount;
savedata->dirty &= ~SAVEDATA_DIRT_NEW; savedata->dirty &= ~SAVEDATA_DIRT_NEW;
if (!(savedata->dirty & SAVEDATA_DIRT_SEEN)) { if (!(savedata->dirty & SAVEDATA_DIRT_SEEN)) {
savedata->dirtAge = frameCount;
savedata->dirty |= SAVEDATA_DIRT_SEEN; savedata->dirty |= SAVEDATA_DIRT_SEEN;
} }
} else if ((savedata->dirty & SAVEDATA_DIRT_SEEN) && frameCount - savedata->dirtAge > CLEANUP_THRESHOLD) { } else if ((savedata->dirty & SAVEDATA_DIRT_SEEN) && frameCount - savedata->dirtAge > CLEANUP_THRESHOLD) {