added avi output directory override (not yet used by FCEUX, however)

This commit is contained in:
adelikat 2008-11-07 14:53:05 +00:00
parent 13f02e79ec
commit 5b0e6d5ee7
8 changed files with 45 additions and 35 deletions

View File

@ -191,23 +191,20 @@ void FCEUI_CheatSearchShowExcluded(void);
void FCEUI_CheatSearchSetCurrentAsOriginal(void); void FCEUI_CheatSearchSetCurrentAsOriginal(void);
//.rom //.rom
#define FCEUIOD_ROMS 0 #define FCEUIOD_ROMS 0 //Roms
//NV = nonvolatile. save data. #define FCEUIOD_NV 1 //NV = nonvolatile. save data.
#define FCEUIOD_NV 1 #define FCEUIOD_STATES 2 //savestates
//savestates #define FCEUIOD_FDSROM 3 //disksys.rom
#define FCEUIOD_STATES 2 #define FCEUIOD_SNAPS 4 //screenshots
//.fds ? #define FCEUIOD_CHEATS 5 //cheats
#define FCEUIOD_FDSROM 3 #define FCEUIOD_MOVIES 6 //.fm2 files
#define FCEUIOD_SNAPS 4 #define FCEUIOD_MEMW 7 //memory watch fiels
#define FCEUIOD_CHEATS 5 #define FCEUIOD_BBOT 8 //basicbot, obsolete
#define FCEUIOD_MOVIES 6 #define FCEUIOD_MACRO 9 //macro files - tasedit, currently not implemented
#define FCEUIOD_MEMW 7 #define FCEUIOD_INPUT 10 //input presets
#define FCEUIOD_BBOT 8 #define FCEUIOD_LUA 11 //lua scripts
#define FCEUIOD_MACRO 9 #define FCEUIOD_AVI 12 //default file for avi output
#define FCEUIOD_INPUT 10 #define FCEUIOD__COUNT 13 //base directory override?
#define FCEUIOD_LUA 11
#define FCEUIOD__COUNT 12
void FCEUI_SetDirOverride(int which, char *n); void FCEUI_SetDirOverride(int which, char *n);

View File

@ -106,7 +106,8 @@ static CFGSTRUCT fceuconfig[] = {
NACS("odmacro",directory_names[9]), NACS("odmacro",directory_names[9]),
NACS("odinput",directory_names[10]), NACS("odinput",directory_names[10]),
NACS("odlua",directory_names[11]), NACS("odlua",directory_names[11]),
NACS("odbase",directory_names[12]), NACS("odavi",directory_names[12]),
NACS("odbase",directory_names[13]),
AC(winspecial), AC(winspecial),
AC(winsizemulx), AC(winsizemulx),

View File

@ -122,7 +122,7 @@ static BOOL CALLBACK DirConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
// If a directory selection button was pressed, ask the // If a directory selection button was pressed, ask the
// user for a directory. // user for a directory.
static char *helpert[13] = { static char *helpert[14] = {
"Roms", "Roms",
"Battery Saves", "Battery Saves",
"Save States", "Save States",
@ -135,7 +135,8 @@ static BOOL CALLBACK DirConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
"Macro files", "Macro files",
"Input Presets", "Input Presets",
"Lua Scripts", "Lua Scripts",
"Base Directory" "Avi Directory",
"Base Directory",
}; };
char name[MAX_PATH]; char name[MAX_PATH];

View File

@ -127,7 +127,7 @@ int PauseAfterLoad;
// Contains the names of the overridden standard directories // Contains the names of the overridden standard directories
// in the order roms, nonvol, states, fdsrom, snaps, cheats, movies, memwatch, macro, input presets, lua scripts, base // in the order roms, nonvol, states, fdsrom, snaps, cheats, movies, memwatch, macro, input presets, lua scripts, base
char *directory_names[13] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; char *directory_names[14] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
//Handle of the main window. //Handle of the main window.
HWND hAppWnd = 0; HWND hAppWnd = 0;
@ -176,7 +176,7 @@ void SetDirs()
{ {
int x; int x;
static int jlist[13]= { static int jlist[14]= {
FCEUIOD_ROMS, FCEUIOD_ROMS,
FCEUIOD_NV, FCEUIOD_NV,
FCEUIOD_STATES, FCEUIOD_STATES,
@ -189,6 +189,7 @@ void SetDirs()
FCEUIOD_MACRO, FCEUIOD_MACRO,
FCEUIOD_INPUT, FCEUIOD_INPUT,
FCEUIOD_LUA, FCEUIOD_LUA,
FCEUIOD_AVI,
FCEUIOD__COUNT}; FCEUIOD__COUNT};
FCEUI_SetSnapName(eoptions & EO_SNAPNAME); FCEUI_SetSnapName(eoptions & EO_SNAPNAME);
@ -198,9 +199,9 @@ void SetDirs()
FCEUI_SetDirOverride(jlist[x], directory_names[x]); FCEUI_SetDirOverride(jlist[x], directory_names[x]);
} }
if(directory_names[12]) if(directory_names[13])
{ {
FCEUI_SetBaseDirectory(directory_names[12]); FCEUI_SetBaseDirectory(directory_names[13]);
} }
else else
{ {

View File

@ -45,10 +45,10 @@ extern int AutoFireOffset;
extern int vmod; extern int vmod;
extern char* directory_names[13]; extern char* directory_names[14];
///Contains the names of the default directories. ///Contains the names of the default directories.
static const char *default_directory_names[12] = { static const char *default_directory_names[13] = {
"", // roms "", // roms
"sav", // nonvol "sav", // nonvol
"fcs", // states "fcs", // states
@ -60,7 +60,8 @@ static const char *default_directory_names[12] = {
"tools", // macro "tools", // macro
"tools", // input presets "tools", // input presets
"tools", // lua scripts "tools", // lua scripts
"" // adelikat - adding a dummy one here ( [12] but only 11 entries) "", // avi output
"" // adelikat - adding a dummy one here ( [13] but only 12 entries)
}; };
#define NUMBER_OF_DIRECTORIES sizeof(directory_names) / sizeof(*directory_names) #define NUMBER_OF_DIRECTORIES sizeof(directory_names) / sizeof(*directory_names)

View File

@ -301,9 +301,9 @@ STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_VISIBLE | WS_CAPTIO
CAPTION "Directories Configuration" CAPTION "Directories Configuration"
FONT 8, "MS Sans Serif", 0, 0, 0x0 FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN BEGIN
DEFPUSHBUTTON "OK",CLOSE_BUTTON,175,237,56,14 DEFPUSHBUTTON "OK",CLOSE_BUTTON,175,246,56,14
PUSHBUTTON "Cancel",BTN_CANCEL,239,237,56,14 PUSHBUTTON "Cancel",BTN_CANCEL,239,246,56,14
EDITTEXT 112,71,9,158,12,ES_AUTOHSCROLL EDITTEXT 113,71,9,158,12,ES_AUTOHSCROLL
EDITTEXT EDIT_ROMS,71,27,158,12,ES_AUTOHSCROLL EDITTEXT EDIT_ROMS,71,27,158,12,ES_AUTOHSCROLL
EDITTEXT 101,71,45,158,12,ES_AUTOHSCROLL EDITTEXT 101,71,45,158,12,ES_AUTOHSCROLL
EDITTEXT 102,71,63,158,12,ES_AUTOHSCROLL EDITTEXT 102,71,63,158,12,ES_AUTOHSCROLL
@ -316,7 +316,7 @@ BEGIN
EDITTEXT 107,71,165,158,12,ES_AUTOHSCROLL EDITTEXT 107,71,165,158,12,ES_AUTOHSCROLL
EDITTEXT 110,71,183,158,12,ES_AUTOHSCROLL EDITTEXT 110,71,183,158,12,ES_AUTOHSCROLL
EDITTEXT 111,71,201,158,12,ES_AUTOHSCROLL EDITTEXT 111,71,201,158,12,ES_AUTOHSCROLL
PUSHBUTTON "Browse...",212,239,8,56,14 PUSHBUTTON "Browse...",213,239,8,56,14
PUSHBUTTON "Browse...",BUTTON_ROMS,239,26,56,14 PUSHBUTTON "Browse...",BUTTON_ROMS,239,26,56,14
PUSHBUTTON "Browse...",201,239,44,56,14 PUSHBUTTON "Browse...",201,239,44,56,14
PUSHBUTTON "Browse...",202,239,62,56,14 PUSHBUTTON "Browse...",202,239,62,56,14
@ -338,6 +338,9 @@ BEGIN
LTEXT "Memory Watch",IDC_STATIC,10,166,52,9 LTEXT "Memory Watch",IDC_STATIC,10,166,52,9
LTEXT "Input Presets",IDC_STATIC,10,184,42,8 LTEXT "Input Presets",IDC_STATIC,10,184,42,8
LTEXT "Lua Scripts",IDC_STATIC,10,202,36,8 LTEXT "Lua Scripts",IDC_STATIC,10,202,36,8
EDITTEXT 112,71,219,158,12,ES_AUTOHSCROLL
PUSHBUTTON "Browse...",212,239,218,56,14
LTEXT "Avi Output",IDC_STATIC,9,219,34,8
END END
DWBDIALOG DIALOG 33, 99, 250, 56 DWBDIALOG DIALOG 33, 99, 250, 56

View File

@ -479,7 +479,7 @@ void FCEUI_SetBaseDirectory(std::string const & dir)
BaseDirectory = dir; BaseDirectory = dir;
} }
static char *odirs[FCEUIOD__COUNT]={0,0,0,0,0,0,0,0,0,0,0,0}; // odirs, odors. ^_^ static char *odirs[FCEUIOD__COUNT]={0,0,0,0,0,0,0,0,0,0,0,0,0}; // odirs, odors. ^_^
void FCEUI_SetDirOverride(int which, char *n) void FCEUI_SetDirOverride(int which, char *n)
{ {
@ -552,6 +552,12 @@ std::string FCEU_GetPath(int type)
else else
return BaseDirectory + PSS + "tools"; return BaseDirectory + PSS + "tools";
break; break;
case FCEUMKF_AVI:
if(odirs[FCEUIOD_AVI])
return (odirs[FCEUIOD_LUA]);
else
return BaseDirectory;
break;
} }
return ret; return ret;

View File

@ -159,5 +159,5 @@ void FCEU_SplitArchiveFilename(std::string src, std::string& archive, std::strin
#define FCEUMKF_ROMS 18 #define FCEUMKF_ROMS 18
#define FCEUMKF_INPUT 19 #define FCEUMKF_INPUT 19
#define FCEUMKF_LUA 20 #define FCEUMKF_LUA 20
#define FCEUMKF_AVI 21
#endif #endif