all repos — mgba @ 981072a2991ad9e42261e74c1e94f16c238c2678

mGBA Game Boy Advance Emulator

GBA Savedata: Early return in force type if types already match
Vicki Pfau vi@endrift.com
Sun, 16 Sep 2018 11:06:09 -0700
commit

981072a2991ad9e42261e74c1e94f16c238c2678

parent

1f57dec081f68ba3572c2ce11786867557069a57

1 files changed, 3 insertions(+), 0 deletions(-)

jump to
M src/gba/savedata.csrc/gba/savedata.c

@@ -195,6 +195,9 @@ return true;

} void GBASavedataForceType(struct GBASavedata* savedata, enum SavedataType type) { + if (savedata->type == type) { + return; + } if (savedata->type != SAVEDATA_AUTODETECT) { struct VFile* vf = savedata->vf; int mapMode = savedata->mapMode;