* fix fds bug; .sav file was being opened read-only and causing "error reading auxillary FDS file"
* someone please test this change on win32 to ensure nothing is broken
This commit is contained in:
parent
e0988eac20
commit
bd1d923b78
|
@ -801,7 +801,7 @@ int FDSLoad(const char *name, FCEUFILE *fp)
|
||||||
|
|
||||||
fclose(zp);
|
fclose(zp);
|
||||||
|
|
||||||
if (!disableBatteryLoading)
|
if (!disableBatteryLoading)
|
||||||
{
|
{
|
||||||
FCEUFILE *tp;
|
FCEUFILE *tp;
|
||||||
char *fn=strdup(FCEU_MakeFName(FCEUMKF_FDS,0,0).c_str());
|
char *fn=strdup(FCEU_MakeFName(FCEUMKF_FDS,0,0).c_str());
|
||||||
|
@ -813,7 +813,7 @@ if (!disableBatteryLoading)
|
||||||
memcpy(diskdatao[x],diskdata[x],65500);
|
memcpy(diskdatao[x],diskdata[x],65500);
|
||||||
}
|
}
|
||||||
|
|
||||||
if((tp=FCEU_fopen(fn,0,"rb",0)))
|
if((tp=FCEU_fopen(fn,0,"wb",0)))
|
||||||
{
|
{
|
||||||
FreeFDSMemory();
|
FreeFDSMemory();
|
||||||
if(!SubLoad(tp))
|
if(!SubLoad(tp))
|
||||||
|
|
Loading…
Reference in New Issue