Permalink
Browse files
Revert "GBA: Disable cheat hooks"
- Loading branch information...
Showing
with
5 additions
and
3 deletions.
-
+2
−2
src/gba/cheats.c
-
+3
−1
src/gba/gba.c
|
|
@@ -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) {
|
|
|
|
|
|
@@ -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);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
0 comments on commit
1807b66