diff options
| author | LillyJadeKatrin <lilly.kitty.1988@gmail.com> | 2023-06-07 21:53:38 -0400 |
|---|---|---|
| committer | LillyJadeKatrin <lilly.kitty.1988@gmail.com> | 2023-12-02 16:41:17 -0500 |
| commit | 3aebbbb3e74f24b6da7537052f8b78c6b600eefa (patch) | |
| tree | 31cc7a4ac1f725bc7dbb31677610519920eaf39f /Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp | |
| parent | 0abfa94bc83b99bfe02b9f310c6cd3ddcb7e11ec (diff) | |
Disable cheats in hardcore mode
RetroAchievements does not allow cheats such as Action Replay or Gecko in hardcore mode, for fairness.
Diffstat (limited to 'Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp b/Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp index 988bcf329c..1aa6afb643 100644 --- a/Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp +++ b/Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp @@ -26,6 +26,7 @@ #include "DolphinQt/Config/CheatCodeEditor.h" #include "DolphinQt/Config/CheatWarningWidget.h" +#include "DolphinQt/Config/HardcoreWarningWidget.h" #include "DolphinQt/QtUtils/ModalMessageBox.h" #include "DolphinQt/QtUtils/NonDefaultQPushButton.h" #include "DolphinQt/QtUtils/SetWindowDecorations.h" @@ -61,6 +62,9 @@ GeckoCodeWidget::~GeckoCodeWidget() = default; void GeckoCodeWidget::CreateWidgets() { m_warning = new CheatWarningWidget(m_game_id, m_restart_required, this); +#ifdef USE_RETRO_ACHIEVEMENTS + m_hc_warning = new HardcoreWarningWidget(this); +#endif // USE_RETRO_ACHIEVEMENTS m_code_list = new QListWidget; m_name_label = new QLabel; m_creator_label = new QLabel; @@ -102,6 +106,9 @@ void GeckoCodeWidget::CreateWidgets() auto* layout = new QVBoxLayout; layout->addWidget(m_warning); +#ifdef USE_RETRO_ACHIEVEMENTS + layout->addWidget(m_hc_warning); +#endif // USE_RETRO_ACHIEVEMENTS layout->addWidget(m_code_list); auto* info_layout = new QFormLayout; @@ -150,6 +157,10 @@ void GeckoCodeWidget::ConnectWidgets() connect(m_download_codes, &QPushButton::clicked, this, &GeckoCodeWidget::DownloadCodes); connect(m_warning, &CheatWarningWidget::OpenCheatEnableSettings, this, &GeckoCodeWidget::OpenGeneralSettings); +#ifdef USE_RETRO_ACHIEVEMENTS + connect(m_hc_warning, &HardcoreWarningWidget::OpenAchievementSettings, this, + &GeckoCodeWidget::OpenAchievementSettings); +#endif // USE_RETRO_ACHIEVEMENTS } void GeckoCodeWidget::OnSelectionChanged() |
