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.
This commit is contained in:
LillyJadeKatrin 2024-09-10 07:47:52 -04:00
parent 1e5ea752d8
commit afb9862a82
5 changed files with 3 additions and 11 deletions

View File

@ -749,8 +749,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()

View File

@ -245,9 +245,6 @@ static void ApplyPatches(const Core::CPUThreadGuard& guard, const std::vector<Pa
static void ApplyMemoryPatches(const Core::CPUThreadGuard& guard,
std::span<const std::size_t> 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)
{

View File

@ -524,9 +524,6 @@ static bool MemoryMatchesAt(const Core::CPUThreadGuard& guard, u32 offset,
static void ApplyMemoryPatch(const Core::CPUThreadGuard& guard, u32 offset,
std::span<const u8> value, std::span<const u8> original)
{
if (AchievementManager::GetInstance().IsHardcoreModeActive())
return;
if (value.empty())
return;

View File

@ -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("Unapproved codes will not be applied in hardcore mode."));
m_settings_button = new QPushButton(tr("Achievement Settings"));
auto* layout = new QHBoxLayout;

View File

@ -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);