[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()
{
if (g_Settings)
{
g_Settings->UnregisterChangeCB(UserInterface_InFullScreen,this,(CSettings::SettingChangedFunc)StaticRefreshSettings);
}
if (g_Settings)
{
g_Settings->UnregisterChangeCB(UserInterface_InFullScreen, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
}
}
void CNotificationSettings::RegisterNotifications()
{
g_Settings->RegisterChangeCB(UserInterface_InFullScreen, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
RefreshSettings();
g_Settings->RegisterChangeCB(UserInterface_InFullScreen, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
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
{
static void StaticRefreshSettings (CNotificationSettings * _this)
{
_this->RefreshSettings();
}
static void StaticRefreshSettings(CNotificationSettings * _this)
{
_this->RefreshSettings();
}
void RefreshSettings ( void );
void RefreshSettings(void);
static bool m_bInFullScreen;
static bool m_bInFullScreen;
protected:
CNotificationSettings();
virtual ~CNotificationSettings();
CNotificationSettings();
virtual ~CNotificationSettings();
void RegisterNotifications (void);
inline bool InFullScreen ( void ) const { return m_bInFullScreen; }
void RegisterNotifications(void);
inline bool InFullScreen(void) const { return m_bInFullScreen; }
};