project64/Source/Project64-core/Settings/RecompilerSettings.cpp

41 lines
1.5 KiB
C++
Raw Normal View History

2012-12-19 09:30:18 +00:00
/****************************************************************************
* *
2015-11-10 05:21:49 +00:00
* Project64 - A Nintendo 64 emulator. *
2012-12-19 09:30:18 +00:00
* http://www.pj64-emu.com/ *
* Copyright (C) 2012 Project64. All rights reserved. *
* *
* License: *
* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
* *
****************************************************************************/
#include "stdafx.h"
#include "RecompilerSettings.h"
2016-10-04 19:58:11 +00:00
int CRecompilerSettings::m_RefCount = 0;
2016-10-04 19:58:11 +00:00
bool CRecompilerSettings::m_bShowRecompMemSize;
CRecompilerSettings::CRecompilerSettings()
{
m_RefCount += 1;
if (m_RefCount == 1)
{
g_Settings->RegisterChangeCB(Debugger_ShowRecompMemSize, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
RefreshSettings();
}
}
CRecompilerSettings::~CRecompilerSettings()
{
m_RefCount -= 1;
if (m_RefCount == 0)
{
g_Settings->UnregisterChangeCB(Debugger_ShowRecompMemSize, this, (CSettings::SettingChangedFunc)StaticRefreshSettings);
}
}
void CRecompilerSettings::RefreshSettings()
{
m_bShowRecompMemSize = g_Settings->LoadBool(Debugger_ShowRecompMemSize);
}