summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2025-09-28 14:10:06 -0400
committerGitHub <noreply@github.com>2025-09-28 14:10:06 -0400
commite5fbc74156be92f25efab656fe499ec875ab91f0 (patch)
treec5012ebdde3318a3f171a928cd49ea7eeadb0d8e /Source
parente1c7734ee44e1f49089c8f4e3c2496e573e7cae6 (diff)
parent55cfb958c7016c32f0f690169c06301e38b63e59 (diff)
Merge pull request #13082 from Dentomologist/generalpane_hardcore_mode_tooltip_clarifications
GeneralPane: Add Hardcore Mode tooltip clarifications
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/DolphinQt/Settings/GeneralPane.cpp36
-rw-r--r--Source/Core/DolphinQt/Settings/GeneralPane.h1
2 files changed, 30 insertions, 7 deletions
diff --git a/Source/Core/DolphinQt/Settings/GeneralPane.cpp b/Source/Core/DolphinQt/Settings/GeneralPane.cpp
index 508a5bdbbf..93e3d0d9c8 100644
--- a/Source/Core/DolphinQt/Settings/GeneralPane.cpp
+++ b/Source/Core/DolphinQt/Settings/GeneralPane.cpp
@@ -95,6 +95,8 @@ void GeneralPane::OnEmulationStateChanged(Core::State state)
m_checkbox_discord_presence->setEnabled(!running);
#endif
m_combobox_fallback_region->setEnabled(!running);
+
+ UpdateDescriptionsUsingHardcoreStatus();
}
void GeneralPane::ConnectLayout()
@@ -397,12 +399,6 @@ void GeneralPane::AddDescriptions()
"<br><br>This setting cannot be changed while emulation is active."
"<br><br><dolphin_emphasis>If unsure, leave this checked.</dolphin_emphasis>");
#endif
- static constexpr char TR_SPEEDLIMIT_DESCRIPTION[] =
- QT_TR_NOOP("Controls how fast emulation runs relative to the original hardware."
- "<br><br>Values higher than 100% will emulate faster than the original hardware "
- "can run, if your hardware is able to keep up. Values lower than 100% will slow "
- "emulation instead. Unlimited will emulate as fast as your hardware is able to."
- "<br><br><dolphin_emphasis>If unsure, select 100%.</dolphin_emphasis>");
static constexpr char TR_UPDATE_TRACK_DESCRIPTION[] = QT_TR_NOOP(
"Selects which update track Dolphin uses when checking for updates at startup. If a new "
"update is available, Dolphin will show a list of changes made since your current version "
@@ -450,7 +446,6 @@ void GeneralPane::AddDescriptions()
#endif
m_combobox_speedlimit->SetTitle(tr("Speed Limit"));
- m_combobox_speedlimit->SetDescription(tr(TR_SPEEDLIMIT_DESCRIPTION));
if (AutoUpdateChecker::SystemSupportsAutoUpdates())
{
@@ -468,3 +463,30 @@ void GeneralPane::AddDescriptions()
m_button_generate_new_identity->SetDescription(tr(TR_GENERATE_NEW_IDENTITY_DESCRIPTION));
#endif
}
+
+void GeneralPane::UpdateDescriptionsUsingHardcoreStatus()
+{
+ const bool hardcore_enabled = AchievementManager::GetInstance().IsHardcoreModeActive();
+
+ static constexpr char TR_SPEEDLIMIT_DESCRIPTION[] =
+ QT_TR_NOOP("Controls how fast emulation runs relative to the original hardware."
+ "<br><br>Values higher than 100% will emulate faster than the original hardware "
+ "can run, if your hardware is able to keep up. Values lower than 100% will slow "
+ "emulation instead. Unlimited will emulate as fast as your hardware is able to."
+ "<br><br><dolphin_emphasis>If unsure, select 100%.</dolphin_emphasis>");
+ static constexpr char TR_SPEEDLIMIT_RESTRICTION_IN_HARDCORE_DESCRIPTION[] =
+ QT_TR_NOOP("<dolphin_emphasis>When Hardcore Mode is enabled, Speed Limit values less than "
+ "100% will be treated as 100%.</dolphin_emphasis>");
+
+ if (hardcore_enabled)
+ {
+ m_combobox_speedlimit->SetDescription(
+ tr("%1<br><br>%2")
+ .arg(tr(TR_SPEEDLIMIT_DESCRIPTION))
+ .arg(tr(TR_SPEEDLIMIT_RESTRICTION_IN_HARDCORE_DESCRIPTION)));
+ }
+ else
+ {
+ m_combobox_speedlimit->SetDescription(tr(TR_SPEEDLIMIT_DESCRIPTION));
+ }
+}
diff --git a/Source/Core/DolphinQt/Settings/GeneralPane.h b/Source/Core/DolphinQt/Settings/GeneralPane.h
index ffe850491b..17d80f7c38 100644
--- a/Source/Core/DolphinQt/Settings/GeneralPane.h
+++ b/Source/Core/DolphinQt/Settings/GeneralPane.h
@@ -39,6 +39,7 @@ private:
void LoadConfig();
void OnSaveConfig();
void OnEmulationStateChanged(Core::State state);
+ void UpdateDescriptionsUsingHardcoreStatus();
// Widgets
QVBoxLayout* m_main_layout;