}
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);
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;
strncpy(Info->Name, ptr, 16);
}
-int sioFreeze(gzFile f, int Mode) {
+int sioFreeze(void *f, int Mode) {
gzfreeze(buf, sizeof(buf));
gzfreeze(&StatReg, sizeof(StatReg));
gzfreeze(&ModeReg, sizeof(ModeReg));