GBA: Disable cheat hooks
Jeffrey Pfau jeffrey@endrift.com
Fri, 19 Aug 2016 05:05:07 -0700
2 files changed,
3 insertions(+),
5 deletions(-)
M
src/gba/cheats.c
→
src/gba/cheats.c
@@ -20,7 +20,7 @@ ++cheats->hook->reentries;
if (cheats->hook->reentries > 1) { return; } - GBASetBreakpoint(device->p->board, &device->d, cheats->hook->address, cheats->hook->mode, &cheats->hook->patchedOpcode); + // TODO: Put back hooks } static void _removeBreakpoint(struct mCheatDevice* device, struct GBACheatSet* cheats) {@@ -31,7 +31,7 @@ --cheats->hook->reentries;
if (cheats->hook->reentries > 0) { return; } - GBAClearBreakpoint(device->p->board, cheats->hook->address, cheats->hook->mode, cheats->hook->patchedOpcode); + // TODO: Put back hooks } static void _patchROM(struct mCheatDevice* device, struct GBACheatSet* cheats) {
M
src/gba/gba.c
→
src/gba/gba.c
@@ -815,9 +815,7 @@ struct mCheatDevice* device = (struct mCheatDevice*) gba->cpu->components[CPU_COMPONENT_CHEAT_DEVICE];
size_t i; for (i = 0; i < mCheatSetsSize(&device->cheats); ++i) { struct GBACheatSet* cheats = (struct GBACheatSet*) *mCheatSetsGetPointer(&device->cheats, i); - if (!cheats->hook) { - mCheatRefresh(device, &cheats->d); - } + mCheatRefresh(device, &cheats->d); } }