mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-03 14:49:22 +00:00
Port Enable Cheats to the new config system
This commit is contained in:
parent
67c06cfc55
commit
fa0525f826
9 changed files with 19 additions and 20 deletions
|
@ -12,8 +12,10 @@
|
|||
#include "Common/ChunkFile.h"
|
||||
#include "Common/CommonPaths.h"
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/Config/Config.h"
|
||||
#include "Common/FileUtil.h"
|
||||
|
||||
#include "Core/Config/MainSettings.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/PowerPC/MMU.h"
|
||||
#include "Core/PowerPC/PowerPC.h"
|
||||
|
@ -68,7 +70,7 @@ void SetActiveCodes(const std::vector<GeckoCode>& gcodes)
|
|||
std::lock_guard lk(s_active_codes_lock);
|
||||
|
||||
s_active_codes.clear();
|
||||
if (SConfig::GetInstance().bEnableCheats)
|
||||
if (Config::Get(Config::MAIN_ENABLE_CHEATS))
|
||||
{
|
||||
s_active_codes.reserve(gcodes.size());
|
||||
std::copy_if(gcodes.begin(), gcodes.end(), std::back_inserter(s_active_codes),
|
||||
|
@ -100,7 +102,7 @@ std::vector<GeckoCode> SetAndReturnActiveCodes(const std::vector<GeckoCode>& gco
|
|||
std::lock_guard lk(s_active_codes_lock);
|
||||
|
||||
s_active_codes.clear();
|
||||
if (SConfig::GetInstance().bEnableCheats)
|
||||
if (Config::Get(Config::MAIN_ENABLE_CHEATS))
|
||||
{
|
||||
s_active_codes.reserve(gcodes.size());
|
||||
std::copy_if(gcodes.begin(), gcodes.end(), std::back_inserter(s_active_codes),
|
||||
|
@ -231,7 +233,7 @@ void Shutdown()
|
|||
|
||||
void RunCodeHandler()
|
||||
{
|
||||
if (!SConfig::GetInstance().bEnableCheats)
|
||||
if (!Config::Get(Config::MAIN_ENABLE_CHEATS))
|
||||
return;
|
||||
|
||||
// NOTE: Need to release the lock because of GUI deadlocks with PanicAlert in HostWrite_*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue