mirror of https://github.com/mgba-emu/mgba.git
GBA Savedata: Only unmap savedata if present
This commit is contained in:
parent
573920cae4
commit
aaf12cad27
1
CHANGES
1
CHANGES
|
@ -42,6 +42,7 @@ Bugfixes:
|
|||
- GBA Video: Fix out-of-order OBJWIN
|
||||
- GBA: Count up timers should not count themselves
|
||||
- GBA Savedata: Fix savedata sync timer
|
||||
- GBA Savedata: Only unmap savedata if present
|
||||
Misc:
|
||||
- 3DS: Use blip_add_delta_fast for a small speed improvement
|
||||
- OpenGL: Log shader compilation failure
|
||||
|
|
|
@ -46,7 +46,9 @@ void GBASavedataInit(struct GBASavedata* savedata, struct VFile* vf) {
|
|||
void GBASavedataDeinit(struct GBASavedata* savedata) {
|
||||
if (savedata->vf) {
|
||||
size_t size = GBASavedataSize(savedata);
|
||||
savedata->vf->unmap(savedata->vf, savedata->data, size);
|
||||
if (savedata->data) {
|
||||
savedata->vf->unmap(savedata->vf, savedata->data, size);
|
||||
}
|
||||
savedata->vf = NULL;
|
||||
} else {
|
||||
switch (savedata->type) {
|
||||
|
|
Loading…
Reference in New Issue