From 8447ce99f43324e0a5a1bc3f9774524516348613 Mon Sep 17 00:00:00 2001 From: LillyJadeKatrin Date: Tue, 10 Sep 2024 07:47:52 -0400 Subject: [PATCH] Scale back hardcore code block Now that patches and codes are enabled on a case by case basis, remove patcher code blocking codes entirely in hardcore mode, and reword the warning to be more accurate. --- Source/Core/Core/AchievementManager.cpp | 1 - Source/Core/Core/Config/MainSettings.cpp | 3 +-- Source/Core/Core/PatchEngine.cpp | 3 --- Source/Core/DolphinQt/Config/HardcoreWarningWidget.cpp | 2 +- Source/Core/DolphinQt/Settings/GeneralPane.cpp | 3 +-- 5 files changed, 3 insertions(+), 9 deletions(-) diff --git a/Source/Core/Core/AchievementManager.cpp b/Source/Core/Core/AchievementManager.cpp index e5a6d6c32c..a40f4aaeb5 100644 --- a/Source/Core/Core/AchievementManager.cpp +++ b/Source/Core/Core/AchievementManager.cpp @@ -372,7 +372,6 @@ void AchievementManager::SetHardcoreMode() if (Config::Get(Config::MAIN_EMULATION_SPEED) < 1.0f) Config::SetBaseOrCurrent(Config::MAIN_EMULATION_SPEED, 1.0f); Config::SetBaseOrCurrent(Config::FREE_LOOK_ENABLED, false); - Config::SetBaseOrCurrent(Config::MAIN_ENABLE_CHEATS, false); } } diff --git a/Source/Core/Core/Config/MainSettings.cpp b/Source/Core/Core/Config/MainSettings.cpp index c9cd0333a9..0442347fdd 100644 --- a/Source/Core/Core/Config/MainSettings.cpp +++ b/Source/Core/Core/Config/MainSettings.cpp @@ -751,8 +751,7 @@ bool IsDefaultGCIFolderPathConfigured(ExpansionInterface::Slot slot) bool AreCheatsEnabled() { - return Config::Get(::Config::MAIN_ENABLE_CHEATS) && - !AchievementManager::GetInstance().IsHardcoreModeActive(); + return Config::Get(::Config::MAIN_ENABLE_CHEATS); } bool IsDebuggingEnabled() diff --git a/Source/Core/Core/PatchEngine.cpp b/Source/Core/Core/PatchEngine.cpp index c601b6b39c..e350f1e063 100644 --- a/Source/Core/Core/PatchEngine.cpp +++ b/Source/Core/Core/PatchEngine.cpp @@ -245,9 +245,6 @@ static void ApplyPatches(const Core::CPUThreadGuard& guard, const std::vector memory_patch_indices) { - if (AchievementManager::GetInstance().IsHardcoreModeActive()) - return; - std::lock_guard lock(s_on_frame_memory_mutex); for (std::size_t index : memory_patch_indices) { diff --git a/Source/Core/DolphinQt/Config/HardcoreWarningWidget.cpp b/Source/Core/DolphinQt/Config/HardcoreWarningWidget.cpp index eabec9a46e..257a43c366 100644 --- a/Source/Core/DolphinQt/Config/HardcoreWarningWidget.cpp +++ b/Source/Core/DolphinQt/Config/HardcoreWarningWidget.cpp @@ -35,7 +35,7 @@ void HardcoreWarningWidget::CreateWidgets() auto* icon = new QLabel; icon->setPixmap(warning_icon); - m_text = new QLabel(tr("This feature is disabled in hardcore mode.")); + m_text = new QLabel(tr("Only approved codes will be applied in hardcore mode.")); m_settings_button = new QPushButton(tr("Achievement Settings")); auto* layout = new QHBoxLayout; diff --git a/Source/Core/DolphinQt/Settings/GeneralPane.cpp b/Source/Core/DolphinQt/Settings/GeneralPane.cpp index 06715ceb65..0ab3b263a2 100644 --- a/Source/Core/DolphinQt/Settings/GeneralPane.cpp +++ b/Source/Core/DolphinQt/Settings/GeneralPane.cpp @@ -88,10 +88,9 @@ void GeneralPane::CreateLayout() void GeneralPane::OnEmulationStateChanged(Core::State state) { const bool running = state != Core::State::Uninitialized; - const bool hardcore = AchievementManager::GetInstance().IsHardcoreModeActive(); m_checkbox_dualcore->setEnabled(!running); - m_checkbox_cheats->setEnabled(!running && !hardcore); + m_checkbox_cheats->setEnabled(!running); m_checkbox_override_region_settings->setEnabled(!running); #ifdef USE_DISCORD_PRESENCE m_checkbox_discord_presence->setEnabled(!running);