[Glide64] Move general_setting to settings class

This commit is contained in:
zilmar 2017-03-13 17:53:41 +11:00
parent be7c0b3870
commit e1b254772b
3 changed files with 19 additions and 15 deletions

View File

@ -872,18 +872,3 @@ void CALL DllAbout(HWND /*hParent*/)
dlg.DoModal();
#endif
}
void general_setting(short setting_ID, const char * name, unsigned int value)
{
RegisterSetting(setting_ID, Data_DWORD_General, name, NULL, value, NULL);
}
void game_setting(short setting_ID, const char * name, unsigned int value)
{
RegisterSetting(setting_ID, Data_DWORD_Game, name, NULL, value, NULL);
}
void game_setting_default(short setting_ID, const char * name, short default_setting)
{
RegisterSetting2(setting_ID, Data_DWORD_Game, name, NULL, default_setting);
}

View File

@ -907,6 +907,21 @@ void CSettings::WriteSettings(void)
FlushSettings();
}
void CSettings::general_setting(short setting_ID, const char * name, unsigned int value)
{
RegisterSetting(setting_ID, Data_DWORD_General, name, NULL, value, NULL);
}
void CSettings::game_setting(short setting_ID, const char * name, unsigned int value)
{
RegisterSetting(setting_ID, Data_DWORD_Game, name, NULL, value, NULL);
}
void CSettings::game_setting_default(short setting_ID, const char * name, short default_setting)
{
RegisterSetting2(setting_ID, Data_DWORD_Game, name, NULL, default_setting);
}
void CSettings::SettingsChanged(void)
{
m_ScreenRes = GetSetting(Set_Resolution);

View File

@ -306,6 +306,10 @@ public:
void UpdateScreenSize(bool fullscreen);
private:
static void general_setting(short setting_ID, const char * name, unsigned int value);
static void game_setting(short setting_ID, const char * name, unsigned int value);
static void game_setting_default(short setting_ID, const char * name, short default_setting);
void RegisterSettings(void);
void UpdateAspectRatio(void);
void SettingsChanged(void);