Auto-save fixed
This commit is contained in:
parent
f01cb59af5
commit
2e73f0dffe
15
src/file.cpp
15
src/file.cpp
|
@ -594,7 +594,6 @@ std::string GetMfn() //Retrieves the movie filename from curMovieFilename (for a
|
|||
splitpath(curMovieFilename,drv,dir,name,ext);
|
||||
movieFilenamePart = std::string(".") + name;
|
||||
}
|
||||
//const char* mfn = movieFilenamePart.c_str();
|
||||
return movieFilenamePart;
|
||||
}
|
||||
|
||||
|
@ -735,16 +734,6 @@ std::string FCEU_MakeFName(int type, int id1, char *cd1)
|
|||
break;
|
||||
case FCEUMKF_STATE:
|
||||
{
|
||||
/* std::string movieFilenamePart;
|
||||
extern char curMovieFilename[512];
|
||||
if(*curMovieFilename)
|
||||
{
|
||||
char drv[PATH_MAX], dir[PATH_MAX], name[PATH_MAX], ext[PATH_MAX];
|
||||
splitpath(curMovieFilename,drv,dir,name,ext);
|
||||
movieFilenamePart = std::string(".") + name;
|
||||
}
|
||||
const char* mfn = movieFilenamePart.c_str(); */
|
||||
//mfn = GetMfn();
|
||||
mfnString = GetMfn();
|
||||
mfn = mfnString.c_str();
|
||||
if(odirs[FCEUIOD_STATES])
|
||||
|
@ -805,14 +794,14 @@ std::string FCEU_MakeFName(int type, int id1, char *cd1)
|
|||
break;
|
||||
case FCEUMKF_AUTOSTATE:
|
||||
extern char curMovieFilename[512];
|
||||
mfn = GetMfn().c_str();
|
||||
mfnString = GetMfn();
|
||||
mfn = mfnString.c_str();
|
||||
if(odirs[FCEUIOD_STATES])
|
||||
{
|
||||
sprintf(ret,"%s"PSS"%s%s-autosave%d.fcs",odirs[FCEUIOD_STATES],FileBase,mfn,id1);
|
||||
}
|
||||
else
|
||||
{
|
||||
//sprintf(ret,"%s"PSS"fcs"PSS"%s.%s-autosave.fcs",BaseDirectory.c_str(), FileBase, mfn);
|
||||
sprintf(ret,"%s"PSS"fcs"PSS"%s%s-autosave%d.fcs",BaseDirectory.c_str(),FileBase,mfn,id1);
|
||||
}
|
||||
if(stat(ret,&tmpstat)==-1)
|
||||
|
|
Loading…
Reference in New Issue