mirror of
https://github.com/dborth/vbagx.git
synced 2024-11-22 10:39:18 +01:00
fix MBC2 saving/loading
This commit is contained in:
parent
0c9866bb66
commit
fe4821550d
@ -2717,9 +2717,9 @@ void gbWriteSaveMBC2(const char * name)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fwrite(&gbMemory[0xa000],
|
fwrite(&gbMemoryMap[0x0a],
|
||||||
1,
|
1,
|
||||||
256,
|
512,
|
||||||
file);
|
file);
|
||||||
|
|
||||||
fclose(file);
|
fclose(file);
|
||||||
@ -2899,12 +2899,12 @@ bool gbReadSaveMBC2(const char * name)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t read = fread(&gbMemory[0xa000],
|
size_t read = fread(&gbMemoryMap[0x0a],
|
||||||
1,
|
1,
|
||||||
256,
|
512,
|
||||||
file);
|
file);
|
||||||
|
|
||||||
if(read != 256) {
|
if(read != 512) {
|
||||||
systemMessage(MSG_FAILED_TO_READ_SGM,
|
systemMessage(MSG_FAILED_TO_READ_SGM,
|
||||||
N_("Battery file's size incompatible with the rom settings %s (%d).\nWarning : save of the battery file is now disabled !"), name, read);
|
N_("Battery file's size incompatible with the rom settings %s (%d).\nWarning : save of the battery file is now disabled !"), name, read);
|
||||||
fclose(file);
|
fclose(file);
|
||||||
|
Loading…
Reference in New Issue
Block a user