Fix some logic bug of Directories Dialog.
This commit is contained in:
parent
757c13e22a
commit
a3a0e3e543
|
@ -114,8 +114,7 @@ static INT_PTR CALLBACK DirConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
|
||||||
|
|
||||||
case WM_CLOSE:
|
case WM_CLOSE:
|
||||||
case WM_QUIT:
|
case WM_QUIT:
|
||||||
CloseDirectoriesDialog(hwndDlg);
|
EndDialog(hwndDlg, 0);
|
||||||
CloseDirectoriesDialog(hwndDlg); //adelikat: Hacky but this fixes the directory overides bug (or at least some instances of it). This of course really just puts a band-aid on the real problem.
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
|
@ -126,9 +125,7 @@ static INT_PTR CALLBACK DirConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
|
||||||
{
|
{
|
||||||
case CLOSE_BUTTON:
|
case CLOSE_BUTTON:
|
||||||
CloseDirectoriesDialog(hwndDlg);
|
CloseDirectoriesDialog(hwndDlg);
|
||||||
break;
|
CloseDirectoriesDialog(hwndDlg); //adelikat: Hacky but this fixes the directory overides bug (or at least some instances of it). This of course really just puts a band-aid on the real problem.
|
||||||
case BTN_CANCEL:
|
|
||||||
EndDialog(hwndDlg, 0);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
static char *helpert[14] = {
|
static char *helpert[14] = {
|
||||||
|
|
|
@ -71,20 +71,21 @@ char *GetRomName(bool force = false); //Checks if rom is loaded, if so, outputs
|
||||||
char *GetRomPath(bool force = false); //Checks if rom is loaded, if so, outputs the Rom path only
|
char *GetRomPath(bool force = false); //Checks if rom is loaded, if so, outputs the Rom path only
|
||||||
|
|
||||||
///Contains the names of the default directories.
|
///Contains the names of the default directories.
|
||||||
static const char *default_directory_names[13] = {
|
static const char *default_directory_names[14] = {
|
||||||
"", // roms
|
"", // roms
|
||||||
"sav", // nonvol
|
"sav", // novol
|
||||||
"fcs", // states
|
"fcs", // states
|
||||||
"", // fdsrom
|
"", // fdsrom
|
||||||
"snaps", // snaps
|
"snaps", // snaps
|
||||||
"cheats", // cheats
|
"cheats", // cheats
|
||||||
"movies", // movies
|
"movies", // movies
|
||||||
"tools", // memwatch
|
"tools", // memwatch
|
||||||
|
"tools", // bot
|
||||||
"tools", // macro
|
"tools", // macro
|
||||||
"tools", // input presets
|
"tools", // input presets
|
||||||
"tools", // lua scripts
|
"luascripts", // lua scripts
|
||||||
"", // avi output
|
"", // avi output
|
||||||
"" // adelikat - adding a dummy one here ( [13] but only 12 entries)
|
"" // adelikat - adding a dummy one here ( [14] but only 13 entries)
|
||||||
};
|
};
|
||||||
|
|
||||||
#define NUMBER_OF_DIRECTORIES sizeof(directory_names) / sizeof(*directory_names)
|
#define NUMBER_OF_DIRECTORIES sizeof(directory_names) / sizeof(*directory_names)
|
||||||
|
|
|
@ -70,10 +70,10 @@ BEGIN
|
||||||
PUSHBUTTON "Browse...",BUTTON_MEMWATCH,239,152,56,14
|
PUSHBUTTON "Browse...",BUTTON_MEMWATCH,239,152,56,14
|
||||||
LTEXT "&Input Presets",IDC_STATIC,10,172,42,8
|
LTEXT "&Input Presets",IDC_STATIC,10,172,42,8
|
||||||
EDITTEXT EDIT_PRESET,71,171,158,12,ES_AUTOHSCROLL
|
EDITTEXT EDIT_PRESET,71,171,158,12,ES_AUTOHSCROLL
|
||||||
PUSHBUTTON "Browse...",210,239,170,56,14
|
PUSHBUTTON "Browse...",BUTTON_PRESET,239,170,56,14
|
||||||
LTEXT "&Lua Scripts",IDC_STATIC,10,190,36,8
|
LTEXT "&Lua Scripts",IDC_STATIC,10,190,36,8
|
||||||
EDITTEXT EDIT_LUA,71,189,158,12,ES_AUTOHSCROLL
|
EDITTEXT EDIT_LUA,71,189,158,12,ES_AUTOHSCROLL
|
||||||
PUSHBUTTON "Browse...",211,239,188,56,14
|
PUSHBUTTON "Browse...",BUTTON_LUA,239,188,56,14
|
||||||
LTEXT "A&vi Output",IDC_STATIC,10,208,34,8
|
LTEXT "A&vi Output",IDC_STATIC,10,208,34,8
|
||||||
EDITTEXT EDIT_AVI,71,207,158,12,ES_AUTOHSCROLL
|
EDITTEXT EDIT_AVI,71,207,158,12,ES_AUTOHSCROLL
|
||||||
PUSHBUTTON "Browse...",BUTTON_AVI,239,206,56,14
|
PUSHBUTTON "Browse...",BUTTON_AVI,239,206,56,14
|
||||||
|
|
Loading…
Reference in New Issue