mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
bugfix in bram code
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@89 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
1bb6f3cb23
commit
18e95d7f8a
1 changed files with 2 additions and 0 deletions
|
@ -1493,6 +1493,8 @@ int emu_SaveLoadGame(int load, int sram)
|
|||
|
||||
if (sram_size) {
|
||||
sramFile = fopen(saveFname, truncate ? "wb" : "r+b");
|
||||
if (!sramFile) sramFile = fopen(saveFname, "wb"); // retry
|
||||
if (!sramFile) return -1;
|
||||
ret = fwrite(sram_data, 1, sram_size, sramFile);
|
||||
ret = (ret != sram_size) ? -1 : 0;
|
||||
fclose(sramFile);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue