Libretro: Fix adding codes with hooks

This commit is contained in:
Vicki Pfau 2018-12-26 13:28:08 -08:00
parent 062ba0767c
commit 6442d17b4c
3 changed files with 5 additions and 0 deletions

View File

@ -143,6 +143,7 @@ Bugfixes:
- GB Video: Changing LYC while LCDC off doesn't affect STAT (fixes mgba.io/i/1224)
- GBA I/O: SOUNDCNT_HI is readable when sound is off
- SDL: Fix handling of invalid gamepads (fixes mgba.io/i/1239)
- Libretro: Fix adding codes with hooks
Misc:
- mGUI: Add SGB border configuration option
- mGUI: Add support for different settings types

View File

@ -276,6 +276,9 @@ static void GBACheatRefresh(struct mCheatSet* cheats, struct mCheatDevice* devic
struct GBACheatSet* gbaset = (struct GBACheatSet*) cheats;
if (cheats->enabled) {
_patchROM(device, gbaset);
if (gbaset->hook && !gbaset->hook->reentries) {
_addBreakpoint(device, gbaset);
}
} else {
_unpatchROM(device, gbaset);
}

View File

@ -657,6 +657,7 @@ void retro_cheat_set(unsigned index, bool enabled, const char* code) {
}
}
#endif
cheatSet->refresh(cheatSet, device);
}
unsigned retro_get_region(void) {