From e1b254772bc80a222867cf8c268c12c85aa16164 Mon Sep 17 00:00:00 2001 From: zilmar Date: Mon, 13 Mar 2017 17:53:41 +1100 Subject: [PATCH] [Glide64] Move general_setting to settings class --- Source/Glide64/Config.cpp | 15 --------------- Source/Glide64/Settings.cpp | 15 +++++++++++++++ Source/Glide64/Settings.h | 4 ++++ 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/Source/Glide64/Config.cpp b/Source/Glide64/Config.cpp index 787b6c147..175e04bcb 100644 --- a/Source/Glide64/Config.cpp +++ b/Source/Glide64/Config.cpp @@ -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); -} diff --git a/Source/Glide64/Settings.cpp b/Source/Glide64/Settings.cpp index 560026df4..a8cf9ea74 100644 --- a/Source/Glide64/Settings.cpp +++ b/Source/Glide64/Settings.cpp @@ -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); diff --git a/Source/Glide64/Settings.h b/Source/Glide64/Settings.h index 98fba8ade..857dbd293 100644 --- a/Source/Glide64/Settings.h +++ b/Source/Glide64/Settings.h @@ -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);