Add GetPref, SetPref.

This commit is contained in:
Glenn Maynard
2003-07-22 03:07:51 +00:00
parent d817a6e023
commit 364b01787b
2 changed files with 22 additions and 0 deletions
+19
View File
@@ -71,3 +71,22 @@ void AddStepManiaInstallDir( CString sNewInstallDir )
}
bool GetPref( CString name, bool &val )
{
CRegistry Reg;
Reg.SetRootKey(HKEY_LOCAL_MACHINE);
Reg.SetKey("Software\\StepMania\\smpackage", FALSE); // don't create if not already present
return Reg.Read( name, val );
}
bool SetPref( CString name, bool val )
{
CRegistry Reg;
Reg.SetRootKey(HKEY_LOCAL_MACHINE);
Reg.SetKey("Software\\StepMania\\smpackage", TRUE); // don't create if not already present
Reg.WriteBool( name, val );
return false;
}
+3
View File
@@ -7,4 +7,7 @@ void WriteStepManiaInstallDirs( const CStringArray& asInstallDirsToWrite );
void GetStepManiaInstallDirs( CStringArray& asInstallDirsOut );
void AddStepManiaInstallDir( CString sNewInstallDir );
bool GetPref( CString name, bool &val );
bool SetPref( CString name, bool val );
#endif