diff options
author | twinaphex | 2013-01-29 01:59:01 +0100 |
---|---|---|
committer | twinaphex | 2013-01-29 01:59:01 +0100 |
commit | 2dfdc938c99783e187f60c1d13db73e0ee434c92 (patch) | |
tree | eb063a3af74ff44b2ba22ec34deb5811129d1cd4 /libpcsxcore/sio.c | |
parent | e5f4d90401d099d5191f95e9f771ab5a81c87ed8 (diff) | |
parent | 17f84149a604fefb8181a280487bd48ca7a353b2 (diff) | |
download | pcsx_rearmed-2dfdc938c99783e187f60c1d13db73e0ee434c92.tar.gz pcsx_rearmed-2dfdc938c99783e187f60c1d13db73e0ee434c92.tar.bz2 pcsx_rearmed-2dfdc938c99783e187f60c1d13db73e0ee434c92.zip |
Merge git://github.com/notaz/pcsx_rearmed
Diffstat (limited to 'libpcsxcore/sio.c')
-rw-r--r-- | libpcsxcore/sio.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libpcsxcore/sio.c b/libpcsxcore/sio.c index ea96e95..b3732d2 100644 --- a/libpcsxcore/sio.c +++ b/libpcsxcore/sio.c @@ -409,10 +409,13 @@ void LoadMcd(int mcd, char *str) { } McdDisable[mcd - 1] = 0; - if (str == NULL || *str == 0) { + if (str == NULL || strcmp(str, "none") == 0) { McdDisable[mcd - 1] = 1; return; } + if (*str == 0) + return; + f = fopen(str, "rb"); if (f == NULL) { SysPrintf(_("The memory card %s doesn't exist - creating it\n"), str); @@ -455,6 +458,9 @@ void LoadMcds(char *mcd1, char *mcd2) { void SaveMcd(char *mcd, char *data, uint32_t adr, int size) { FILE *f; + if (mcd == NULL || *mcd == 0 || strcmp(mcd, "none") == 0) + return; + f = fopen(mcd, "r+b"); if (f != NULL) { struct stat buf; |