mirror of https://github.com/mgba-emu/mgba.git
GBA: Disable cheat hooks
This commit is contained in:
parent
026f5233db
commit
2e55bd098a
|
@ -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) {
|
||||||
|
|
|
@ -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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue