Win32 - fixed a couple of booboo's in the AVI filename + directory selection code
This commit is contained in:
parent
47236ddffa
commit
79a6391a7d
|
@ -1,11 +1,12 @@
|
|||
---version 2.0.4 yet to be released---
|
||||
23-nov-2008 - adelikat - Win32 - fixed some errors in my AVI directory override code
|
||||
23-nov-2008 - shinydoofy - movie subs now have a toggle button in the SDL build (F10 by default)
|
||||
23-nov-2008 - adelikat - movie subtitle system installed
|
||||
22-nov-2008 - adelikat - win32 - added help menu item to TASEdit and Hex Editor, Minor TASEdit clean up
|
||||
22-nov-2008 - adelikat - win32 - fixed so that turbo works with VBlank sync settings
|
||||
22-nov-2008 - adelikat - Win32 - added help menu item to TASEdit and Hex Editor, Minor TASEdit clean up
|
||||
22-nov-2008 - adelikat - Win32 - fixed so that turbo works with VBlank sync settings
|
||||
21-nov-2008 - qfox - Lua - added joypad.write and joypad.get for naming consistency. Added plane display toggle for lua: FCEU.fceu_setrenderplanes(sprites, background) which accepts two boolean args and toggles the drawing of those planes from Lua. Changed movie.framecount() to always return a number, even when no movie is playing. Should return the same number as in view; the number of frames since last reset, if no movie is playing.
|
||||
17-nov-2008 - adelikat - added Open Cheats hotkey (currently a windows only function)
|
||||
16-nov-2008 - adelikat - win32 - menu items that are hotkey mappable show the current hotkey mapping
|
||||
16-nov-2008 - adelikat - Win32 - menu items that are hotkey mappable show the current hotkey mapping
|
||||
15-nov-2008 - adelikat - Win32 - memwatch - implemented RamChange() - monitors the behavior of ram addresses
|
||||
15-nov-2008 - adelikat - Win32 - re-enabled sound buffer time
|
||||
15-nov-2008 - adelikat - Clip Left and Right sides taken into account when drawing on screen (record/play/pause, lag & frame counters, messages, etc)
|
||||
|
|
|
@ -1619,43 +1619,29 @@ void FCEUD_AviRecordTo(void)
|
|||
OPENFILENAME ofn;
|
||||
char szChoice[MAX_PATH];
|
||||
|
||||
string tempFilename, aviFilename;
|
||||
|
||||
std::string aviDirectory = FCEU_GetPath(21); //21 = FCEUMKF_AVI
|
||||
if (aviDirectory.find_last_of("\\") != (aviDirectory.size()-1))
|
||||
aviDirectory.append("\\"); //if directory override has no / then add one
|
||||
|
||||
//if we are playing a movie, construct the filename from the current movie.
|
||||
//else construct it from the ROM name.
|
||||
if(FCEUMOV_Mode(MOVIEMODE_PLAY|MOVIEMODE_RECORD))
|
||||
{
|
||||
std::string aviFilename;
|
||||
extern char 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)
|
||||
{
|
||||
*dot='\0';
|
||||
}
|
||||
|
||||
strcat(szChoice, ".avi");
|
||||
tempFilename = GetMfn(); //get movie filename
|
||||
tempFilename.erase(0,1); //remove dot
|
||||
}
|
||||
//else construct it from the ROM name.
|
||||
else
|
||||
{
|
||||
extern char FileBase[];
|
||||
sprintf(szChoice, "%s.avi", FileBase);
|
||||
}
|
||||
tempFilename = GetRomName();
|
||||
|
||||
aviFilename = aviDirectory + tempFilename; //concate avi directory and movie filename
|
||||
|
||||
strcpy(szChoice, aviFilename.c_str());
|
||||
char* dot = strrchr(szChoice,'.');
|
||||
|
||||
if (dot) *dot='\0';
|
||||
strcat(szChoice, ".avi");
|
||||
|
||||
// avi record file browser
|
||||
memset(&ofn, 0, sizeof(ofn));
|
||||
|
|
|
@ -556,7 +556,7 @@ std::string FCEU_GetPath(int type)
|
|||
if(odirs[FCEUIOD_AVI])
|
||||
return (odirs[FCEUIOD_AVI]);
|
||||
else
|
||||
return ""; //If avi output directory not specified, return nothing so that avi code can handle it its own way
|
||||
return BaseDirectory + PSS + "tools";
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue