From 2e73f0dffe8af3389b151417cf849bd5c16410d1 Mon Sep 17 00:00:00 2001 From: adelikat Date: Wed, 25 Jun 2008 04:16:43 +0000 Subject: [PATCH] Auto-save fixed --- src/file.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/file.cpp b/src/file.cpp index 44714bd4..51c5fafd 100644 --- a/src/file.cpp +++ b/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)