Add Config Changed Callback for Hardcore Mode

This commit is contained in:
LillyJadeKatrin 2024-11-07 21:11:58 -05:00
parent 7e1074b140
commit ef71c75458
2 changed files with 2 additions and 1 deletions

View File

@ -16,6 +16,7 @@
#include "Common/Assert.h"
#include "Common/BitUtils.h"
#include "Common/CommonPaths.h"
#include "Common/Config/Config.h"
#include "Common/FileUtil.h"
#include "Common/IOFile.h"
#include "Common/Image.h"
@ -64,6 +65,7 @@ void AchievementManager::Init()
[](const char* message, const rc_client_t* client) {
INFO_LOG_FMT(ACHIEVEMENTS, "{}", message);
});
Config::AddConfigChangedCallback([this] { SetHardcoreMode(); });
SetHardcoreMode();
m_queue.Reset("AchievementManagerQueue", [](const std::function<void()>& func) { func(); });
m_image_queue.Reset("AchievementManagerImageQueue",

View File

@ -329,7 +329,6 @@ void AchievementSettingsWidget::ToggleProgress()
void AchievementSettingsWidget::UpdateHardcoreMode()
{
AchievementManager::GetInstance().SetHardcoreMode();
if (Config::Get(Config::RA_HARDCORE_ENABLED))
{
Settings::Instance().SetDebugModeEnabled(false);