[Projet64] Cleanup Notification Settings.cpp

This commit is contained in:
zilmar 2015-11-15 08:07:53 +11:00
parent 5be42089b0
commit ce062e70ed
2 changed files with 18 additions and 18 deletions

View File

@ -18,19 +18,19 @@ CNotificationSettings::CNotificationSettings()
CNotificationSettings::~CNotificationSettings() CNotificationSettings::~CNotificationSettings()
{ {
if (g_Settings) if (g_Settings)
{ {
g_Settings->UnregisterChangeCB(UserInterface_InFullScreen,this,(CSettings::SettingChangedFunc)StaticRefreshSettings); g_Settings->UnregisterChangeCB(UserInterface_InFullScreen, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
} }
} }
void CNotificationSettings::RegisterNotifications() void CNotificationSettings::RegisterNotifications()
{ {
g_Settings->RegisterChangeCB(UserInterface_InFullScreen, this, (CSettings::SettingChangedFunc)StaticRefreshSettings); g_Settings->RegisterChangeCB(UserInterface_InFullScreen, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
RefreshSettings(); RefreshSettings();
} }
void CNotificationSettings::RefreshSettings() void CNotificationSettings::RefreshSettings()
{ {
m_bInFullScreen = g_Settings->LoadBool(UserInterface_InFullScreen); m_bInFullScreen = g_Settings->LoadBool(UserInterface_InFullScreen);
} }

View File

@ -12,19 +12,19 @@
class CNotificationSettings class CNotificationSettings
{ {
static void StaticRefreshSettings (CNotificationSettings * _this) static void StaticRefreshSettings(CNotificationSettings * _this)
{ {
_this->RefreshSettings(); _this->RefreshSettings();
} }
void RefreshSettings ( void ); void RefreshSettings(void);
static bool m_bInFullScreen; static bool m_bInFullScreen;
protected: protected:
CNotificationSettings(); CNotificationSettings();
virtual ~CNotificationSettings(); virtual ~CNotificationSettings();
void RegisterNotifications (void); void RegisterNotifications(void);
inline bool InFullScreen ( void ) const { return m_bInFullScreen; } inline bool InFullScreen(void) const { return m_bInFullScreen; }
}; };