GB: Fix GBSavedataUnmask

This commit is contained in:
Jeffrey Pfau 2016-08-28 10:00:35 -07:00
parent 0083fad966
commit 24bb930850
1 changed files with 1 additions and 1 deletions

View File

@ -127,10 +127,10 @@ void GBSavedataMask(struct GB* gb, struct VFile* vf) {
}
void GBSavedataUnmask(struct GB* gb) {
GBSramDeinit(gb);
if (gb->sramVf == gb->sramRealVf) {
return;
}
GBSramDeinit(gb);
gb->sramVf = gb->sramRealVf;
gb->memory.sram = gb->sramVf->map(gb->sramVf, 0x20000, MAP_WRITE);
}