Add GetPref, SetPref.
This commit is contained in:
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user