mirror of https://github.com/mgba-emu/mgba.git
GB: Fix GBSavedataUnmask
This commit is contained in:
parent
0083fad966
commit
24bb930850
|
@ -127,10 +127,10 @@ void GBSavedataMask(struct GB* gb, struct VFile* vf) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void GBSavedataUnmask(struct GB* gb) {
|
void GBSavedataUnmask(struct GB* gb) {
|
||||||
GBSramDeinit(gb);
|
|
||||||
if (gb->sramVf == gb->sramRealVf) {
|
if (gb->sramVf == gb->sramRealVf) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
GBSramDeinit(gb);
|
||||||
gb->sramVf = gb->sramRealVf;
|
gb->sramVf = gb->sramRealVf;
|
||||||
gb->memory.sram = gb->sramVf->map(gb->sramVf, 0x20000, MAP_WRITE);
|
gb->memory.sram = gb->sramVf->map(gb->sramVf, 0x20000, MAP_WRITE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue