Win32 - avi output directory override implemented.
This commit is contained in:
parent
5b0e6d5ee7
commit
3be6963245
|
@ -1581,11 +1581,28 @@ void FCEUD_AviRecordTo(void)
|
|||
char szChoice[MAX_PATH];
|
||||
|
||||
//if we are playing a movie, construct the filename from the current movie.
|
||||
//else construct it from the filename.
|
||||
//else construct it from the ROM name.
|
||||
if(FCEUMOV_Mode(MOVIEMODE_PLAY|MOVIEMODE_RECORD))
|
||||
{
|
||||
std::string aviFilename;
|
||||
extern char curMovieFilename[];
|
||||
strcpy(szChoice, curMovieFilename);
|
||||
|
||||
//adelikat - use avi output directory override if specified
|
||||
std::string aviDirectory = FCEU_GetPath(21); //21 = FCEUMKF_AVI
|
||||
if (aviDirectory != "") //If directory specified, use it instead
|
||||
{
|
||||
if (aviDirectory.find_last_of("\\") != (aviDirectory.size()))
|
||||
aviDirectory.append("\\"); //if directory override has no / then add one
|
||||
|
||||
std::string tempfilename = GetMfn(); //get movie filename
|
||||
tempfilename.erase(0,1); //remove dot
|
||||
|
||||
aviFilename = aviDirectory + tempfilename; //concate avi directory and movie filename
|
||||
}
|
||||
else
|
||||
aviFilename = curMovieFilename; //If no avidirectory override, simply default to the same directory as the movie
|
||||
|
||||
strcpy(szChoice, aviFilename.c_str());
|
||||
char* dot = strrchr(szChoice,'.');
|
||||
|
||||
if (dot)
|
||||
|
|
|
@ -554,9 +554,9 @@ std::string FCEU_GetPath(int type)
|
|||
break;
|
||||
case FCEUMKF_AVI:
|
||||
if(odirs[FCEUIOD_AVI])
|
||||
return (odirs[FCEUIOD_LUA]);
|
||||
return (odirs[FCEUIOD_AVI]);
|
||||
else
|
||||
return BaseDirectory;
|
||||
return ""; //If avi output directory not specified, return nothing so that avi code can handle it its own way
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -137,6 +137,7 @@ void GetFileBase(const char *f);
|
|||
std::string FCEU_GetPath(int type);
|
||||
std::string FCEU_MakePath(int type, const char* filebase);
|
||||
std::string FCEU_MakeFName(int type, int id1, const char *cd1);
|
||||
std::string GetMfn();
|
||||
void FCEU_SplitArchiveFilename(std::string src, std::string& archive, std::string& file, std::string& fileToOpen);
|
||||
|
||||
#define FCEUMKF_STATE 1
|
||||
|
|
Loading…
Reference in New Issue