GBA: Disable cheat hooks

This commit is contained in:
Jeffrey Pfau 2016-08-19 05:05:07 -07:00
parent 026f5233db
commit 2e55bd098a
2 changed files with 3 additions and 5 deletions

View File

@ -20,7 +20,7 @@ static void _addBreakpoint(struct mCheatDevice* device, struct GBACheatSet* chea
if (cheats->hook->reentries > 1) { if (cheats->hook->reentries > 1) {
return; 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) { static void _removeBreakpoint(struct mCheatDevice* device, struct GBACheatSet* cheats) {
@ -31,7 +31,7 @@ static void _removeBreakpoint(struct mCheatDevice* device, struct GBACheatSet* c
if (cheats->hook->reentries > 0) { if (cheats->hook->reentries > 0) {
return; 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) { static void _patchROM(struct mCheatDevice* device, struct GBACheatSet* cheats) {

View File

@ -815,9 +815,7 @@ void GBAFrameEnded(struct GBA* gba) {
size_t i; size_t i;
for (i = 0; i < mCheatSetsSize(&device->cheats); ++i) { for (i = 0; i < mCheatSetsSize(&device->cheats); ++i) {
struct GBACheatSet* cheats = (struct GBACheatSet*) *mCheatSetsGetPointer(&device->cheats, i); struct GBACheatSet* cheats = (struct GBACheatSet*) *mCheatSetsGetPointer(&device->cheats, i);
if (!cheats->hook) { mCheatRefresh(device, &cheats->d);
mCheatRefresh(device, &cheats->d);
}
} }
} }