notaz.gp2x.de
/
pcsx_rearmed.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
misc: merge from pcsxr r91261,r91276
[pcsx_rearmed.git]
/
libpcsxcore
/
sio.c
diff --git
a/libpcsxcore/sio.c
b/libpcsxcore/sio.c
index
81fe0ea
..
b3732d2
100644
(file)
--- a/
libpcsxcore/sio.c
+++ b/
libpcsxcore/sio.c
@@
-409,10
+409,13
@@
void LoadMcd(int mcd, char *str) {
}
McdDisable[mcd - 1] = 0;
}
McdDisable[mcd - 1] = 0;
- if (str == NULL ||
*str
== 0) {
+ if (str == NULL ||
strcmp(str, "none")
== 0) {
McdDisable[mcd - 1] = 1;
return;
}
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);
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;
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;
f = fopen(mcd, "r+b");
if (f != NULL) {
struct stat buf;
@@
-806,7
+812,7
@@
void GetMcdBlockInfo(int mcd, int block, McdBlock *Info) {
strncpy(Info->Name, ptr, 16);
}
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));
gzfreeze(buf, sizeof(buf));
gzfreeze(&StatReg, sizeof(StatReg));
gzfreeze(&ModeReg, sizeof(ModeReg));