From 6f18d16a0abcbc0655ed82fd30796fa06242c2b8 Mon Sep 17 00:00:00 2001 From: notaz Date: Mon, 28 Jan 2013 20:14:54 +0200 Subject: ange how no memcards are specified empty string now just means "don't save/load" --- libpcsxcore/sio.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'libpcsxcore') 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; -- cgit v1.2.3