mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-04-13 20:00:29 -04:00
Disable cheats in hardcore mode
RetroAchievements does not allow cheats such as Action Replay or Gecko in hardcore mode, for fairness.
This commit is contained in:
@@ -71,7 +71,7 @@ void SetActiveCodes(std::span<const GeckoCode> gcodes)
|
||||
std::lock_guard lk(s_active_codes_lock);
|
||||
|
||||
s_active_codes.clear();
|
||||
if (Config::Get(Config::MAIN_ENABLE_CHEATS))
|
||||
if (Config::AreCheatsEnabled())
|
||||
{
|
||||
s_active_codes.reserve(gcodes.size());
|
||||
std::copy_if(gcodes.begin(), gcodes.end(), std::back_inserter(s_active_codes),
|
||||
@@ -103,7 +103,7 @@ std::vector<GeckoCode> SetAndReturnActiveCodes(std::span<const GeckoCode> gcodes
|
||||
std::lock_guard lk(s_active_codes_lock);
|
||||
|
||||
s_active_codes.clear();
|
||||
if (Config::Get(Config::MAIN_ENABLE_CHEATS))
|
||||
if (Config::AreCheatsEnabled())
|
||||
{
|
||||
s_active_codes.reserve(gcodes.size());
|
||||
std::copy_if(gcodes.begin(), gcodes.end(), std::back_inserter(s_active_codes),
|
||||
@@ -238,7 +238,7 @@ void Shutdown()
|
||||
|
||||
void RunCodeHandler(const Core::CPUThreadGuard& guard)
|
||||
{
|
||||
if (!Config::Get(Config::MAIN_ENABLE_CHEATS))
|
||||
if (!Config::AreCheatsEnabled())
|
||||
return;
|
||||
|
||||
// NOTE: Need to release the lock because of GUI deadlocks with PanicAlert in HostWrite_*
|
||||
|
||||
Reference in New Issue
Block a user