REMOVE "always use last dir" option

This commit is contained in:
spacy51 2008-09-09 11:34:31 +00:00
parent 20d9708b4d
commit a008b39055
8 changed files with 3 additions and 29 deletions

View File

@ -52,7 +52,6 @@ static int CALLBACK browseCallbackProc(HWND hWnd, UINT msg,
Directories::Directories(CWnd* pParent /*=NULL*/)
: CDialog(Directories::IDD, pParent)
, m_alwaysLastRomDir(FALSE)
{
}
@ -66,7 +65,6 @@ void Directories::DoDataExchange(CDataExchange* pDX)
DDX_Control(pDX, IDC_GBROM_PATH, m_gbromPath);
DDX_Control(pDX, IDC_CAPTURE_PATH, m_capturePath);
DDX_Control(pDX, IDC_BATTERY_PATH, m_batteryPath);
DDX_Check(pDX, IDC_ALWAYSLASTROMDIR, m_alwaysLastRomDir);
}

View File

@ -51,7 +51,4 @@ private:
CString browseForDir(CString title);
bool directoryDoesExist(const char *directory);
public:
BOOL m_alwaysLastRomDir;
};

View File

@ -1032,17 +1032,11 @@ bool MainWnd::fileOpenSelect( int system )
CString filter;
CString title;
if( theApp.alwaysLastDir ) {
initialDir = regQueryStringValue( _T("lastDir"), _T(".") );
}
switch( system )
{
case 0:
// GBA
if( !theApp.alwaysLastDir ) {
initialDir = regQueryStringValue( _T("romdir"), _T(".") );
}
initialDir = regQueryStringValue( _T("romdir"), _T(".") );
selectedFilter = regQueryDwordValue( _T("selectedFilter"), 0);
if( (selectedFilter < 0) || (selectedFilter > 2) ) {
selectedFilter = 0;
@ -1051,17 +1045,13 @@ bool MainWnd::fileOpenSelect( int system )
break;
case 1:
// GBC
if( !theApp.alwaysLastDir ) {
initialDir = regQueryStringValue( _T("gbcromdir"), _T(".") );
}
initialDir = regQueryStringValue( _T("gbcromdir"), _T(".") );
// TODO: memorize selected filter for GBC as well
filter = winLoadFilter( IDS_FILTER_GBCROM );
break;
case 2:
// GB
if( !theApp.alwaysLastDir ) {
initialDir = regQueryStringValue( _T("gbromdir"), _T(".") );
}
initialDir = regQueryStringValue( _T("gbromdir"), _T(".") );
// TODO: memorize selected filter for GB as well
filter = winLoadFilter( IDS_FILTER_GBROM );
break;

View File

@ -562,9 +562,7 @@ void MainWnd::OnOptionsEmulatorAssociate()
void MainWnd::OnOptionsEmulatorDirectories()
{
Directories dlg;
dlg.m_alwaysLastRomDir = theApp.alwaysLastDir ? BST_CHECKED : BST_UNCHECKED;
dlg.DoModal();
theApp.alwaysLastDir = ( dlg.m_alwaysLastRomDir == BST_CHECKED );
}
void MainWnd::OnOptionsEmulatorDisablestatusmessages()

View File

@ -260,7 +260,6 @@ VBA::VBA()
paused = false;
recentFreeze = false;
autoSaveLoadCheatList = false;
alwaysLastDir = false;
winout = NULL;
removeIntros = false;
autoIPS = true;
@ -1712,9 +1711,6 @@ void VBA::loadSettings()
autoSaveLoadCheatList = regQueryDwordValue("autoSaveCheatList", 0) ?
true : false;
alwaysLastDir =
( regQueryDwordValue( "alwaysUseLastRomDirectory", 0 ) == 1 ) ? true : false;
gbPaletteOption = regQueryDwordValue("gbPaletteOption", 0);
if(gbPaletteOption < 0)
gbPaletteOption = 0;
@ -2648,8 +2644,6 @@ void VBA::saveSettings()
regSetDwordValue("autoSaveCheatList", autoSaveLoadCheatList);
regSetDwordValue("alwaysUseLastRomDirectory", alwaysLastDir ? 1 : 0);
regSetDwordValue("gbPaletteOption", gbPaletteOption);
regSetBinaryValue("gbPalette", (char *)systemGbPalette,

View File

@ -127,7 +127,6 @@ class VBA : public CWinApp
CString recentFiles[10];
bool recentFreeze;
bool autoSaveLoadCheatList;
bool alwaysLastDir;
FILE *winout;
bool removeIntros;
bool autoIPS;

View File

@ -246,7 +246,6 @@ BEGIN
"Static",SS_LEFTNOWORDWRAP | WS_GROUP,12,234,90,24
DEFPUSHBUTTON "OK",IDOK,120,246,48,18
PUSHBUTTON "Cancel",IDCANCEL,168,246,48,18
CONTROL "Always use last ROM dir",IDC_ALWAYSLASTROMDIR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,120,222,96,8
END
IDD_CONFIG DIALOGEX 0, 0, 448, 102

View File

@ -539,7 +539,6 @@
#define IDC_COMBO_REFRESH_RATE 1282
#define IDC_COMBO_DEVICE 1283
#define IDC_CHECK1 1284
#define IDC_ALWAYSLASTROMDIR 1284
#define IDC_CHECK_UPMIX 1284
#define IDC_ENHANCE_SOUND 1284
#define IDC_COMBO_DEV 1285