[Project64] Clean up N64System Settings.cpp
This commit is contained in:
parent
ce062e70ed
commit
bf9fad6737
|
@ -10,56 +10,56 @@
|
|||
****************************************************************************/
|
||||
#include "stdafx.h"
|
||||
|
||||
int CN64SystemSettings::m_RefCount = 0;
|
||||
int CN64SystemSettings::m_RefCount = 0;
|
||||
|
||||
bool CN64SystemSettings::m_bShowCPUPer;
|
||||
bool CN64SystemSettings::m_bProfiling;
|
||||
bool CN64SystemSettings::m_bBasicMode;
|
||||
bool CN64SystemSettings::m_bLimitFPS;
|
||||
bool CN64SystemSettings::m_bShowCPUPer;
|
||||
bool CN64SystemSettings::m_bProfiling;
|
||||
bool CN64SystemSettings::m_bBasicMode;
|
||||
bool CN64SystemSettings::m_bLimitFPS;
|
||||
bool CN64SystemSettings::m_bShowDListAListCount;
|
||||
bool CN64SystemSettings::m_bDisplayFrameRate;
|
||||
|
||||
CN64SystemSettings::CN64SystemSettings()
|
||||
{
|
||||
m_RefCount += 1;
|
||||
if (m_RefCount == 1)
|
||||
{
|
||||
g_Settings->RegisterChangeCB(UserInterface_BasicMode,NULL,RefreshSettings);
|
||||
g_Settings->RegisterChangeCB(UserInterface_ShowCPUPer,NULL,RefreshSettings);
|
||||
g_Settings->RegisterChangeCB(UserInterface_DisplayFrameRate,NULL,RefreshSettings);
|
||||
m_RefCount += 1;
|
||||
if (m_RefCount == 1)
|
||||
{
|
||||
g_Settings->RegisterChangeCB(UserInterface_BasicMode, NULL, RefreshSettings);
|
||||
g_Settings->RegisterChangeCB(UserInterface_ShowCPUPer, NULL, RefreshSettings);
|
||||
g_Settings->RegisterChangeCB(UserInterface_DisplayFrameRate, NULL, RefreshSettings);
|
||||
|
||||
g_Settings->RegisterChangeCB(Debugger_ProfileCode,NULL,RefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Debugger_ShowDListAListCount,NULL,RefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Debugger_ProfileCode, NULL, RefreshSettings);
|
||||
g_Settings->RegisterChangeCB(Debugger_ShowDListAListCount, NULL, RefreshSettings);
|
||||
|
||||
g_Settings->RegisterChangeCB(GameRunning_LimitFPS,NULL,RefreshSettings);
|
||||
g_Settings->RegisterChangeCB(GameRunning_LimitFPS, NULL, RefreshSettings);
|
||||
|
||||
RefreshSettings(NULL);
|
||||
}
|
||||
RefreshSettings(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
CN64SystemSettings::~CN64SystemSettings()
|
||||
{
|
||||
m_RefCount -= 1;
|
||||
if (m_RefCount == 0)
|
||||
{
|
||||
g_Settings->UnregisterChangeCB(UserInterface_BasicMode,NULL,RefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(UserInterface_DisplayFrameRate,NULL,RefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(UserInterface_ShowCPUPer,NULL,RefreshSettings);
|
||||
m_RefCount -= 1;
|
||||
if (m_RefCount == 0)
|
||||
{
|
||||
g_Settings->UnregisterChangeCB(UserInterface_BasicMode, NULL, RefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(UserInterface_DisplayFrameRate, NULL, RefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(UserInterface_ShowCPUPer, NULL, RefreshSettings);
|
||||
|
||||
g_Settings->UnregisterChangeCB(Debugger_ProfileCode,NULL,RefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Debugger_ShowDListAListCount,NULL,RefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Debugger_ProfileCode, NULL, RefreshSettings);
|
||||
g_Settings->UnregisterChangeCB(Debugger_ShowDListAListCount, NULL, RefreshSettings);
|
||||
|
||||
g_Settings->UnregisterChangeCB(GameRunning_LimitFPS,NULL,RefreshSettings);
|
||||
}
|
||||
g_Settings->UnregisterChangeCB(GameRunning_LimitFPS, NULL, RefreshSettings);
|
||||
}
|
||||
}
|
||||
|
||||
void CN64SystemSettings::RefreshSettings(void *)
|
||||
{
|
||||
m_bBasicMode = g_Settings->LoadBool(UserInterface_BasicMode);
|
||||
m_bDisplayFrameRate = g_Settings->LoadBool(UserInterface_DisplayFrameRate);
|
||||
m_bBasicMode = g_Settings->LoadBool(UserInterface_BasicMode);
|
||||
m_bDisplayFrameRate = g_Settings->LoadBool(UserInterface_DisplayFrameRate);
|
||||
|
||||
m_bShowCPUPer = g_Settings->LoadBool(UserInterface_ShowCPUPer);
|
||||
m_bProfiling = g_Settings->LoadBool(Debugger_ProfileCode);
|
||||
m_bShowDListAListCount = g_Settings->LoadBool(Debugger_ShowDListAListCount);
|
||||
m_bLimitFPS = g_Settings->LoadBool(GameRunning_LimitFPS);
|
||||
}
|
||||
m_bShowCPUPer = g_Settings->LoadBool(UserInterface_ShowCPUPer);
|
||||
m_bProfiling = g_Settings->LoadBool(Debugger_ProfileCode);
|
||||
m_bShowDListAListCount = g_Settings->LoadBool(Debugger_ShowDListAListCount);
|
||||
m_bLimitFPS = g_Settings->LoadBool(GameRunning_LimitFPS);
|
||||
}
|
|
@ -13,26 +13,25 @@
|
|||
class CN64SystemSettings
|
||||
{
|
||||
protected:
|
||||
CN64SystemSettings();
|
||||
virtual ~CN64SystemSettings();
|
||||
|
||||
inline static bool bBasicMode ( void ) { return m_bBasicMode; }
|
||||
inline static bool bDisplayFrameRate ( void ) { return m_bDisplayFrameRate; }
|
||||
inline static bool bShowCPUPer ( void ) { return m_bShowCPUPer; }
|
||||
inline static bool bProfiling ( void ) { return m_bProfiling; }
|
||||
inline static bool bShowDListAListCount ( void ) { return m_bShowDListAListCount; }
|
||||
inline static bool bLimitFPS ( void ) { return m_bLimitFPS; }
|
||||
CN64SystemSettings();
|
||||
virtual ~CN64SystemSettings();
|
||||
|
||||
inline static bool bBasicMode(void) { return m_bBasicMode; }
|
||||
inline static bool bDisplayFrameRate(void) { return m_bDisplayFrameRate; }
|
||||
inline static bool bShowCPUPer(void) { return m_bShowCPUPer; }
|
||||
inline static bool bProfiling(void) { return m_bProfiling; }
|
||||
inline static bool bShowDListAListCount(void) { return m_bShowDListAListCount; }
|
||||
inline static bool bLimitFPS(void) { return m_bLimitFPS; }
|
||||
|
||||
private:
|
||||
static void RefreshSettings ( void * );
|
||||
|
||||
static bool m_bShowCPUPer;
|
||||
static bool m_bProfiling;
|
||||
static bool m_bBasicMode;
|
||||
static bool m_bLimitFPS;
|
||||
static bool m_bShowDListAListCount;
|
||||
static bool m_bDisplayFrameRate;
|
||||
static void RefreshSettings(void *);
|
||||
|
||||
static int m_RefCount;
|
||||
static bool m_bShowCPUPer;
|
||||
static bool m_bProfiling;
|
||||
static bool m_bBasicMode;
|
||||
static bool m_bLimitFPS;
|
||||
static bool m_bShowDListAListCount;
|
||||
static bool m_bDisplayFrameRate;
|
||||
|
||||
static int m_RefCount;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue