all repos — mgba @ 44af4697824b34e30103085b0d344d764a99147a

mGBA Game Boy Advance Emulator

Fuzz: Put back cheats
Jeffrey Pfau jeffrey@endrift.com
Sun, 18 Sep 2016 20:43:14 -0700
commit

44af4697824b34e30103085b0d344d764a99147a

parent

103673423b1a88bf9a0a7417d0acd7ae1eaee8f7

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

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

@@ -3,6 +3,7 @@ *

* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "core/cheats.h" #include "core/config.h" #include "core/core.h" #include "core/serialize.h"

@@ -89,6 +90,16 @@ ((struct GBA*) core->board)->hardCrash = false;

} #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;