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 Video: Fix out-of-order OBJWIN
|
||||||
- GBA: Count up timers should not count themselves
|
- GBA: Count up timers should not count themselves
|
||||||
- GBA Savedata: Fix savedata sync timer
|
- GBA Savedata: Fix savedata sync timer
|
||||||
|
- GBA Savedata: Only unmap savedata if present
|
||||||
Misc:
|
Misc:
|
||||||
- 3DS: Use blip_add_delta_fast for a small speed improvement
|
- 3DS: Use blip_add_delta_fast for a small speed improvement
|
||||||
- OpenGL: Log shader compilation failure
|
- OpenGL: Log shader compilation failure
|
||||||
|
|
|
@ -46,7 +46,9 @@ void GBASavedataInit(struct GBASavedata* savedata, struct VFile* vf) {
|
||||||
void GBASavedataDeinit(struct GBASavedata* savedata) {
|
void GBASavedataDeinit(struct GBASavedata* savedata) {
|
||||||
if (savedata->vf) {
|
if (savedata->vf) {
|
||||||
size_t size = GBASavedataSize(savedata);
|
size_t size = GBASavedataSize(savedata);
|
||||||
|
if (savedata->data) {
|
||||||
savedata->vf->unmap(savedata->vf, savedata->data, size);
|
savedata->vf->unmap(savedata->vf, savedata->data, size);
|
||||||
|
}
|
||||||
savedata->vf = NULL;
|
savedata->vf = NULL;
|
||||||
} else {
|
} else {
|
||||||
switch (savedata->type) {
|
switch (savedata->type) {
|
||||||
|
|
Loading…
Reference in New Issue