mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Port Enable Cheats to the new config system
This commit is contained in:
@ -32,13 +32,14 @@
|
||||
|
||||
#include "Common/BitUtils.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Config/Config.h"
|
||||
#include "Common/IniFile.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
|
||||
#include "Core/ARDecrypt.h"
|
||||
#include "Core/CheatCodes.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Config/MainSettings.h"
|
||||
#include "Core/PowerPC/MMU.h"
|
||||
|
||||
namespace ActionReplay
|
||||
@ -112,7 +113,7 @@ struct ARAddr
|
||||
// AR Remote Functions
|
||||
void ApplyCodes(const std::vector<ARCode>& codes)
|
||||
{
|
||||
if (!SConfig::GetInstance().bEnableCheats)
|
||||
if (!Config::Get(Config::MAIN_ENABLE_CHEATS))
|
||||
return;
|
||||
|
||||
std::lock_guard guard(s_lock);
|
||||
@ -141,7 +142,7 @@ void UpdateSyncedCodes(const std::vector<ARCode>& codes)
|
||||
|
||||
std::vector<ARCode> ApplyAndReturnCodes(const std::vector<ARCode>& codes)
|
||||
{
|
||||
if (SConfig::GetInstance().bEnableCheats)
|
||||
if (Config::Get(Config::MAIN_ENABLE_CHEATS))
|
||||
{
|
||||
std::lock_guard guard(s_lock);
|
||||
s_disable_logging = false;
|
||||
@ -156,7 +157,7 @@ std::vector<ARCode> ApplyAndReturnCodes(const std::vector<ARCode>& codes)
|
||||
|
||||
void AddCode(ARCode code)
|
||||
{
|
||||
if (!SConfig::GetInstance().bEnableCheats)
|
||||
if (!Config::Get(Config::MAIN_ENABLE_CHEATS))
|
||||
return;
|
||||
|
||||
if (code.enabled)
|
||||
@ -972,7 +973,7 @@ static bool RunCodeLocked(const ARCode& arcode)
|
||||
|
||||
void RunAllActive()
|
||||
{
|
||||
if (!SConfig::GetInstance().bEnableCheats)
|
||||
if (!Config::Get(Config::MAIN_ENABLE_CHEATS))
|
||||
return;
|
||||
|
||||
// If the mutex is idle then acquiring it should be cheap, fast mutexes
|
||||
|
Reference in New Issue
Block a user