2010-06-07 02:23:58 +00:00
|
|
|
#include "stdafx.h"
|
2015-12-04 06:49:31 +00:00
|
|
|
#include "RecompilerSettings.h"
|
2008-09-18 03:15:49 +00:00
|
|
|
|
2016-10-04 19:58:11 +00:00
|
|
|
int CRecompilerSettings::m_RefCount = 0;
|
2010-10-29 03:20:25 +00:00
|
|
|
|
2016-10-04 19:58:11 +00:00
|
|
|
bool CRecompilerSettings::m_bShowRecompMemSize;
|
2008-09-18 03:15:49 +00:00
|
|
|
|
|
|
|
CRecompilerSettings::CRecompilerSettings()
|
|
|
|
{
|
2015-11-14 21:05:48 +00:00
|
|
|
m_RefCount += 1;
|
|
|
|
if (m_RefCount == 1)
|
|
|
|
{
|
|
|
|
g_Settings->RegisterChangeCB(Debugger_ShowRecompMemSize, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
|
|
|
|
|
|
|
|
RefreshSettings();
|
|
|
|
}
|
2008-09-18 03:15:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
CRecompilerSettings::~CRecompilerSettings()
|
|
|
|
{
|
2015-11-14 21:05:48 +00:00
|
|
|
m_RefCount -= 1;
|
|
|
|
if (m_RefCount == 0)
|
|
|
|
{
|
|
|
|
g_Settings->UnregisterChangeCB(Debugger_ShowRecompMemSize, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
|
|
|
|
}
|
2008-09-18 03:15:49 +00:00
|
|
|
}
|
|
|
|
|
2008-11-14 20:51:06 +00:00
|
|
|
void CRecompilerSettings::RefreshSettings()
|
2008-09-18 03:15:49 +00:00
|
|
|
{
|
2015-11-14 21:05:48 +00:00
|
|
|
m_bShowRecompMemSize = g_Settings->LoadBool(Debugger_ShowRecompMemSize);
|
|
|
|
}
|