Revert "GBA: Disable cheat hooks"

This reverts commit 2e55bd098a.
This commit is contained in:
Vicki Pfau 2018-04-26 06:47:09 -07:00
parent b89b3b6d13
commit 1807b66bd6
2 changed files with 5 additions and 3 deletions

View File

@ -21,7 +21,7 @@ static void _addBreakpoint(struct mCheatDevice* device, struct GBACheatSet* chea
if (cheats->hook->reentries > 1) {
return;
}
// TODO: Put back hooks
GBASetBreakpoint(device->p->board, &device->d, cheats->hook->address, cheats->hook->mode, &cheats->hook->patchedOpcode);
}
static void _removeBreakpoint(struct mCheatDevice* device, struct GBACheatSet* cheats) {
@ -32,7 +32,7 @@ static void _removeBreakpoint(struct mCheatDevice* device, struct GBACheatSet* c
if (cheats->hook->reentries > 0) {
return;
}
// TODO: Put back hooks
GBAClearBreakpoint(device->p->board, cheats->hook->address, cheats->hook->mode, cheats->hook->patchedOpcode);
}
static void _patchROM(struct mCheatDevice* device, struct GBACheatSet* cheats) {

View File

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