GBA Savedata: Fix save mtime updating when r/o

This commit is contained in:
Vicki Pfau 2018-05-08 10:20:58 -07:00
parent 9bf50a9c89
commit 261edb3792
2 changed files with 9 additions and 6 deletions

View File

@ -2,6 +2,7 @@
Bugfixes:
- GBA Video: Mark OAM dirty on reset (fixes mgba.io/i/1062)
- GBA Hardware: Fix RTC overriding light sensor (fixes mgba.io/i/1069)
- GBA Savedata: Fix savedata modified time updating when read-only
0.6.3: (2017-04-14)
Bugfixes:

View File

@ -516,6 +516,7 @@ void GBASavedataClean(struct GBASavedata* savedata, uint32_t frameCount) {
if (savedata->maskWriteback) {
GBASavedataUnmask(savedata);
}
if (savedata->mapMode & MAP_WRITE) {
size_t size = GBASavedataSize(savedata);
savedata->dirty = 0;
if (savedata->data && savedata->vf->sync(savedata->vf, savedata->data, size)) {
@ -524,6 +525,7 @@ void GBASavedataClean(struct GBASavedata* savedata, uint32_t frameCount) {
mLOG(GBA_SAVE, INFO, "Savedata failed to sync!");
}
}
}
}
void GBASavedataSerialize(const struct GBASavedata* savedata, struct GBASerializedState* state) {