summaryrefslogtreecommitdiff
path: root/libretro
diff options
context:
space:
mode:
authorTwinaphex2019-07-02 13:53:53 +0200
committerGitHub2019-07-02 13:53:53 +0200
commit8454df2117d57a6644e832c2d05e51b80740f788 (patch)
treecd355731ea9ee6ece65cd0102235c2b3ae735f4a /libretro
parent903c003cad96add4599f0a94fab7a03735e20d3e (diff)
parentb5e3f8a1c91a6a6b13906d3abf0186290a59467d (diff)
downloadsnes9x2002-8454df2117d57a6644e832c2d05e51b80740f788.tar.gz
snes9x2002-8454df2117d57a6644e832c2d05e51b80740f788.tar.bz2
snes9x2002-8454df2117d57a6644e832c2d05e51b80740f788.zip
Merge pull request #34 from jdgleaver/state-size
Fix save state size
Diffstat (limited to 'libretro')
-rw-r--r--libretro/libretro.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libretro/libretro.c b/libretro/libretro.c
index 2f50909..0321bf9 100644
--- a/libretro/libretro.c
+++ b/libretro/libretro.c
@@ -100,7 +100,13 @@ memstream_t *s_stream;
int s_open(const char *fname, const char *mode)
{
- s_stream = memstream_open(0);
+ unsigned writing = 0;
+
+ if (mode)
+ if (strcmp(mode, "wb") == 0)
+ writing = 1;
+
+ s_stream = memstream_open(writing);
return TRUE;
}