all repos — mgba @ 986dc183409235746a3a205acc431be98125279c

mGBA Game Boy Advance Emulator

Fuzz: Cheats must be initialized after reset
Jeffrey Pfau jeffrey@endrift.com
Mon, 19 Sep 2016 07:31:34 -0700
commit

986dc183409235746a3a205acc431be98125279c

parent

891a607507b3093985e1db427514820cbf926d2c

1 files changed, 10 insertions(+), 10 deletions(-)

jump to
M src/platform/test/fuzz-main.csrc/platform/test/fuzz-main.c

@@ -91,16 +91,6 @@ }

#endif mCoreLoadFile(core, args.fname); - struct mCheatDevice* device; - if (args.cheatsFile && (device = core->cheatDevice(core))) { - struct VFile* vf = VFileOpen(args.cheatsFile, O_RDONLY); - if (vf) { - mCheatDeviceClear(device); - mCheatParseFile(device, vf); - vf->close(vf); - } - } - struct VFile* savestate = 0; struct VFile* savestateOverlay = 0; size_t overlayOffset;

@@ -118,6 +108,16 @@ free(fuzzOpts.ssOverlay);

} core->reset(core); + + struct mCheatDevice* device; + if (args.cheatsFile && (device = core->cheatDevice(core))) { + struct VFile* vf = VFileOpen(args.cheatsFile, O_RDONLY); + if (vf) { + mCheatDeviceClear(device); + mCheatParseFile(device, vf); + vf->close(vf); + } + } if (savestate) { if (!savestateOverlay) {