Skip to content

Commit

Permalink
Merge pull request dolphin-emu#12878 from LillyJadeKatrin/retroachiev…
Browse files Browse the repository at this point in the history
…ements-hardcore-state-changed

Decouple Hardcore from EmulationStateChanged
  • Loading branch information
JMC47 authored Jun 23, 2024
2 parents e9e29da + 29f1b82 commit c536754
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,10 @@ void AchievementSettingsWidget::ToggleRAIntegration()
else
instance.Shutdown();
if (Config::Get(Config::RA_HARDCORE_ENABLED))
{
emit Settings::Instance().EmulationStateChanged(Core::GetState(Core::System::GetInstance()));
emit Settings::Instance().HardcoreStateChanged();
}
}

void AchievementSettingsWidget::Login()
Expand Down Expand Up @@ -266,6 +269,7 @@ void AchievementSettingsWidget::ToggleHardcore()
Settings::Instance().SetDebugModeEnabled(false);
}
emit Settings::Instance().EmulationStateChanged(Core::GetState(Core::System::GetInstance()));
emit Settings::Instance().HardcoreStateChanged();
}

void AchievementSettingsWidget::ToggleUnofficial()
Expand Down
2 changes: 2 additions & 0 deletions Source/Core/DolphinQt/Achievements/AchievementsWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ AchievementsWindow::AchievementsWindow(QWidget* parent) : QDialog(parent)
});
});
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this,
[this] { m_settings_widget->UpdateData(); });
connect(&Settings::Instance(), &Settings::HardcoreStateChanged, this,
[this] { AchievementsWindow::UpdateData({.all = true}); });
}

Expand Down
1 change: 1 addition & 0 deletions Source/Core/DolphinQt/Settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ class Settings final : public QObject
void SDCardInsertionChanged(bool inserted);
void USBKeyboardConnectionChanged(bool connected);
void EnableGfxModsChanged(bool enabled);
void HardcoreStateChanged();

private:
Settings();
Expand Down

0 comments on commit c536754

Please sign in to comment.