set default install dir when launching smpackage

This commit is contained in:
Chris Danford
2005-10-21 07:42:52 +00:00
parent 1903e07f56
commit 04a590b6f2
6 changed files with 34 additions and 14 deletions
+16
View File
@@ -86,6 +86,22 @@ void SetDefaultInstallDir( int iInstallDirIndex )
WriteStepManiaInstallDirs( asInstallDirs );
}
void SetDefaultInstallDir( CString sInstallDir )
{
CStringArray asInstallDirs;
GetStepManiaInstallDirs( asInstallDirs );
bool bAlreadyInList = false;
for( unsigned i=0; i<asInstallDirs.size(); i++ )
{
if( asInstallDirs[i].CompareNoCase(sInstallDir) == 0 )
{
SetDefaultInstallDir( i );
break;
}
}
}
bool GetPref( CString name, bool &val )
{
CRegistry Reg;