mirror of https://github.com/mgba-emu/mgba.git
Libretro: Fix adding codes with hooks
This commit is contained in:
parent
062ba0767c
commit
6442d17b4c
1
CHANGES
1
CHANGES
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue