notaz.gp2x.de
/
picodrive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1bb6f3c
)
bugfix in bram code
author
notaz
<notasas@gmail.com>
Wed, 4 Apr 2007 19:20:47 +0000
(19:20 +0000)
committer
notaz
<notasas@gmail.com>
Wed, 4 Apr 2007 19:20:47 +0000
(19:20 +0000)
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@89
be3aeb3a
-fb24-0410-a615-
afba39da0efa
platform/gp2x/emu.c
patch
|
blob
|
blame
|
history
diff --git
a/platform/gp2x/emu.c
b/platform/gp2x/emu.c
index
074d620
..
eca0dc4
100644
(file)
--- a/
platform/gp2x/emu.c
+++ b/
platform/gp2x/emu.c
@@
-1493,6
+1493,8
@@
int emu_SaveLoadGame(int load, int sram)
\r
if (sram_size) {
\r
sramFile = fopen(saveFname, truncate ? "wb" : "r+b");
\r
+ if (!sramFile) sramFile = fopen(saveFname, "wb"); // retry
\r
+ if (!sramFile) return -1;
\r
ret = fwrite(sram_data, 1, sram_size, sramFile);
\r
ret = (ret != sram_size) ? -1 : 0;
\r
fclose(sramFile);
\r