all repos — mgba @ 2e55bd098ac97fcb203634f5c65651695de6eb38

mGBA Game Boy Advance Emulator

GBA: Disable cheat hooks
Jeffrey Pfau jeffrey@endrift.com
Fri, 19 Aug 2016 05:05:07 -0700
commit

2e55bd098ac97fcb203634f5c65651695de6eb38

parent

026f5233db5a96707d2b4a06f0b22747f0b16b71

2 files changed, 3 insertions(+), 5 deletions(-)

jump to
M src/gba/cheats.csrc/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.csrc/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); } }