mirror of https://github.com/mgba-emu/mgba.git
Core: Fix ROM patches not being unloaded when disabled (fixes #962)
This commit is contained in:
parent
f7a9d8f595
commit
f53a6b22cc
1
CHANGES
1
CHANGES
|
@ -15,6 +15,7 @@ Bugfixes:
|
||||||
- 3DS: Fix opening files in directory names with trailing slashes
|
- 3DS: Fix opening files in directory names with trailing slashes
|
||||||
- GB MBC: Fix MBC2 saves (fixes mgba.io/i/954)
|
- GB MBC: Fix MBC2 saves (fixes mgba.io/i/954)
|
||||||
- GBA Memory: Fix copy-on-write memory leak
|
- GBA Memory: Fix copy-on-write memory leak
|
||||||
|
- Core: Fix ROM patches not being unloaded when disabled (fixes mgba.io/i/962)
|
||||||
Misc:
|
Misc:
|
||||||
- GBA: Improve multiboot image detection
|
- GBA: Improve multiboot image detection
|
||||||
- GB MBC: Remove erroneous bank 0 wrapping
|
- GB MBC: Remove erroneous bank 0 wrapping
|
||||||
|
|
|
@ -253,10 +253,10 @@ bool mCheatSaveFile(struct mCheatDevice* device, struct VFile* vf) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void mCheatRefresh(struct mCheatDevice* device, struct mCheatSet* cheats) {
|
void mCheatRefresh(struct mCheatDevice* device, struct mCheatSet* cheats) {
|
||||||
|
cheats->refresh(cheats, device);
|
||||||
if (!cheats->enabled) {
|
if (!cheats->enabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cheats->refresh(cheats, device);
|
|
||||||
|
|
||||||
size_t elseLoc = 0;
|
size_t elseLoc = 0;
|
||||||
size_t endLoc = 0;
|
size_t endLoc = 0;
|
||||||
|
|
|
@ -244,7 +244,11 @@ bool GBCheatAddLine(struct mCheatSet* set, const char* line, int type) {
|
||||||
|
|
||||||
static void GBCheatRefresh(struct mCheatSet* cheats, struct mCheatDevice* device) {
|
static void GBCheatRefresh(struct mCheatSet* cheats, struct mCheatDevice* device) {
|
||||||
struct GBCheatSet* gbset = (struct GBCheatSet*) cheats;
|
struct GBCheatSet* gbset = (struct GBCheatSet*) cheats;
|
||||||
_patchROM(device, gbset);
|
if (cheats->enabled) {
|
||||||
|
_patchROM(device, gbset);
|
||||||
|
} else {
|
||||||
|
_unpatchROM(device, gbset);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void GBCheatSetCopyProperties(struct mCheatSet* set, struct mCheatSet* oldSet) {
|
static void GBCheatSetCopyProperties(struct mCheatSet* set, struct mCheatSet* oldSet) {
|
||||||
|
|
|
@ -274,7 +274,11 @@ bool GBACheatAddLine(struct mCheatSet* set, const char* line, int type) {
|
||||||
|
|
||||||
static void GBACheatRefresh(struct mCheatSet* cheats, struct mCheatDevice* device) {
|
static void GBACheatRefresh(struct mCheatSet* cheats, struct mCheatDevice* device) {
|
||||||
struct GBACheatSet* gbaset = (struct GBACheatSet*) cheats;
|
struct GBACheatSet* gbaset = (struct GBACheatSet*) cheats;
|
||||||
_patchROM(device, gbaset);
|
if (cheats->enabled) {
|
||||||
|
_patchROM(device, gbaset);
|
||||||
|
} else {
|
||||||
|
_unpatchROM(device, gbaset);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void GBACheatSetCopyProperties(struct mCheatSet* set, struct mCheatSet* oldSet) {
|
static void GBACheatSetCopyProperties(struct mCheatSet* set, struct mCheatSet* oldSet) {
|
||||||
|
|
Loading…
Reference in New Issue