From b2107023bae14ebba544d27bc4dfe42f1f1b60d4 Mon Sep 17 00:00:00 2001 From: Dentomologist Date: Mon, 27 Nov 2023 22:06:08 -0800 Subject: [PATCH 01/10] GeneralPane: Add BalloonTip to dualcore checkbox --- .../Core/DolphinQt/Settings/GeneralPane.cpp | 19 +++++++++++++++---- Source/Core/DolphinQt/Settings/GeneralPane.h | 4 +++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Source/Core/DolphinQt/Settings/GeneralPane.cpp b/Source/Core/DolphinQt/Settings/GeneralPane.cpp index 4804c72102..8aabfdb9fe 100644 --- a/Source/Core/DolphinQt/Settings/GeneralPane.cpp +++ b/Source/Core/DolphinQt/Settings/GeneralPane.cpp @@ -24,6 +24,7 @@ #include "Core/PowerPC/PowerPC.h" #include "Core/System.h" +#include "DolphinQt/Config/ConfigControls/ConfigBool.h" #include "DolphinQt/QtUtils/ModalMessageBox.h" #include "DolphinQt/QtUtils/NonDefaultQPushButton.h" #include "DolphinQt/QtUtils/SetWindowDecorations.h" @@ -52,6 +53,7 @@ GeneralPane::GeneralPane(QWidget* parent) : QWidget(parent) { CreateLayout(); LoadConfig(); + AddDescriptions(); ConnectLayout(); @@ -97,7 +99,6 @@ void GeneralPane::OnEmulationStateChanged(Core::State state) void GeneralPane::ConnectLayout() { - connect(m_checkbox_dualcore, &QCheckBox::toggled, this, &GeneralPane::OnSaveConfig); connect(m_checkbox_cheats, &QCheckBox::toggled, this, &GeneralPane::OnSaveConfig); connect(m_checkbox_override_region_settings, &QCheckBox::stateChanged, this, &GeneralPane::OnSaveConfig); @@ -140,7 +141,7 @@ void GeneralPane::CreateBasic() basic_group->setLayout(basic_group_layout); m_main_layout->addWidget(basic_group); - m_checkbox_dualcore = new QCheckBox(tr("Enable Dual Core (speedhack)")); + m_checkbox_dualcore = new ConfigBool(tr("Enable Dual Core (speedhack)"), Config::MAIN_CPU_THREAD); basic_group_layout->addWidget(m_checkbox_dualcore); m_checkbox_cheats = new QCheckBox(tr("Enable Cheats")); @@ -261,7 +262,6 @@ void GeneralPane::LoadConfig() SignalBlocking(m_checkbox_enable_analytics) ->setChecked(Settings::Instance().IsAnalyticsEnabled()); #endif - SignalBlocking(m_checkbox_dualcore)->setChecked(Config::Get(Config::MAIN_CPU_THREAD)); SignalBlocking(m_checkbox_cheats)->setChecked(Settings::Instance().GetCheatsEnabled()); SignalBlocking(m_checkbox_override_region_settings) ->setChecked(Config::Get(Config::MAIN_OVERRIDE_REGION_SETTINGS)); @@ -353,7 +353,6 @@ void GeneralPane::OnSaveConfig() Settings::Instance().SetAnalyticsEnabled(m_checkbox_enable_analytics->isChecked()); DolphinAnalytics::Instance().ReloadConfig(); #endif - Config::SetBaseOrCurrent(Config::MAIN_CPU_THREAD, m_checkbox_dualcore->isChecked()); Settings::Instance().SetCheatsEnabled(m_checkbox_cheats->isChecked()); Config::SetBaseOrCurrent(Config::MAIN_OVERRIDE_REGION_SETTINGS, m_checkbox_override_region_settings->isChecked()); @@ -378,3 +377,15 @@ void GeneralPane::GenerateNewIdentity() message_box.exec(); } #endif + +void GeneralPane::AddDescriptions() +{ + static constexpr char TR_DUALCORE_DESCRIPTION[] = + QT_TR_NOOP("Separates CPU and GPU emulation work to separate threads. Reduces single-thread " + "burden by spreading Dolphin's heaviest load across two cores, which usually " + "improves performance. However, it can result in glitches and crashes." + "

This setting cannot be changed while emulation is active." + "

If unsure, leave this checked."); + + m_checkbox_dualcore->SetDescription(tr(TR_DUALCORE_DESCRIPTION)); +} diff --git a/Source/Core/DolphinQt/Settings/GeneralPane.h b/Source/Core/DolphinQt/Settings/GeneralPane.h index 476cc67510..2fc68ddc13 100644 --- a/Source/Core/DolphinQt/Settings/GeneralPane.h +++ b/Source/Core/DolphinQt/Settings/GeneralPane.h @@ -5,6 +5,7 @@ #include +class ConfigBool; class QCheckBox; class QComboBox; class QLabel; @@ -30,6 +31,7 @@ private: void CreateBasic(); void CreateAutoUpdate(); void CreateFallbackRegion(); + void AddDescriptions(); void LoadConfig(); void OnSaveConfig(); @@ -40,7 +42,7 @@ private: QComboBox* m_combobox_speedlimit; QComboBox* m_combobox_update_track; QComboBox* m_combobox_fallback_region; - QCheckBox* m_checkbox_dualcore; + ConfigBool* m_checkbox_dualcore; QCheckBox* m_checkbox_cheats; QCheckBox* m_checkbox_override_region_settings; QCheckBox* m_checkbox_auto_disc_change; From d9336a5de0d4a487eebfe9368f8cd406505ff3c6 Mon Sep 17 00:00:00 2001 From: Dentomologist Date: Mon, 27 Nov 2023 22:47:28 -0800 Subject: [PATCH 02/10] GeneralPane: Add BalloonTip to cheats checkbox --- .../Achievements/AchievementSettingsWidget.cpp | 2 +- Source/Core/DolphinQt/Settings.cpp | 9 --------- Source/Core/DolphinQt/Settings.h | 1 - Source/Core/DolphinQt/Settings/GeneralPane.cpp | 15 ++++++++++----- Source/Core/DolphinQt/Settings/GeneralPane.h | 2 +- 5 files changed, 12 insertions(+), 17 deletions(-) diff --git a/Source/Core/DolphinQt/Achievements/AchievementSettingsWidget.cpp b/Source/Core/DolphinQt/Achievements/AchievementSettingsWidget.cpp index fe83fe9146..622b2e848f 100644 --- a/Source/Core/DolphinQt/Achievements/AchievementSettingsWidget.cpp +++ b/Source/Core/DolphinQt/Achievements/AchievementSettingsWidget.cpp @@ -266,7 +266,7 @@ void AchievementSettingsWidget::ToggleHardcore() if (Config::Get(Config::MAIN_EMULATION_SPEED) < 1.0f) Config::SetBaseOrCurrent(Config::MAIN_EMULATION_SPEED, 1.0f); Config::SetBaseOrCurrent(Config::FREE_LOOK_ENABLED, false); - Settings::Instance().SetCheatsEnabled(false); + Config::SetBaseOrCurrent(Config::MAIN_ENABLE_CHEATS, false); Settings::Instance().SetDebugModeEnabled(false); } emit Settings::Instance().EmulationStateChanged(Core::GetState(Core::System::GetInstance())); diff --git a/Source/Core/DolphinQt/Settings.cpp b/Source/Core/DolphinQt/Settings.cpp index 195cf16579..ec930711a1 100644 --- a/Source/Core/DolphinQt/Settings.cpp +++ b/Source/Core/DolphinQt/Settings.cpp @@ -539,15 +539,6 @@ bool Settings::GetCheatsEnabled() const return Config::Get(Config::MAIN_ENABLE_CHEATS); } -void Settings::SetCheatsEnabled(bool enabled) -{ - if (Config::Get(Config::MAIN_ENABLE_CHEATS) != enabled) - { - Config::SetBaseOrCurrent(Config::MAIN_ENABLE_CHEATS, enabled); - emit EnableCheatsChanged(enabled); - } -} - void Settings::SetDebugModeEnabled(bool enabled) { if (AchievementManager::GetInstance().IsHardcoreModeActive()) diff --git a/Source/Core/DolphinQt/Settings.h b/Source/Core/DolphinQt/Settings.h index a1ceb0c8c5..f59e7c143b 100644 --- a/Source/Core/DolphinQt/Settings.h +++ b/Source/Core/DolphinQt/Settings.h @@ -145,7 +145,6 @@ public: // Cheats bool GetCheatsEnabled() const; - void SetCheatsEnabled(bool enabled); // Debug void SetDebugModeEnabled(bool enabled); diff --git a/Source/Core/DolphinQt/Settings/GeneralPane.cpp b/Source/Core/DolphinQt/Settings/GeneralPane.cpp index 8aabfdb9fe..fab903a873 100644 --- a/Source/Core/DolphinQt/Settings/GeneralPane.cpp +++ b/Source/Core/DolphinQt/Settings/GeneralPane.cpp @@ -99,7 +99,8 @@ void GeneralPane::OnEmulationStateChanged(Core::State state) void GeneralPane::ConnectLayout() { - connect(m_checkbox_cheats, &QCheckBox::toggled, this, &GeneralPane::OnSaveConfig); + connect(m_checkbox_cheats, &QCheckBox::toggled, &Settings::Instance(), + &Settings::EnableCheatsChanged); connect(m_checkbox_override_region_settings, &QCheckBox::stateChanged, this, &GeneralPane::OnSaveConfig); connect(m_checkbox_auto_disc_change, &QCheckBox::toggled, this, &GeneralPane::OnSaveConfig); @@ -144,7 +145,7 @@ void GeneralPane::CreateBasic() m_checkbox_dualcore = new ConfigBool(tr("Enable Dual Core (speedhack)"), Config::MAIN_CPU_THREAD); basic_group_layout->addWidget(m_checkbox_dualcore); - m_checkbox_cheats = new QCheckBox(tr("Enable Cheats")); + m_checkbox_cheats = new ConfigBool(tr("Enable Cheats"), Config::MAIN_ENABLE_CHEATS); basic_group_layout->addWidget(m_checkbox_cheats); m_checkbox_override_region_settings = new QCheckBox(tr("Allow Mismatched Region Settings")); @@ -262,7 +263,6 @@ void GeneralPane::LoadConfig() SignalBlocking(m_checkbox_enable_analytics) ->setChecked(Settings::Instance().IsAnalyticsEnabled()); #endif - SignalBlocking(m_checkbox_cheats)->setChecked(Settings::Instance().GetCheatsEnabled()); SignalBlocking(m_checkbox_override_region_settings) ->setChecked(Config::Get(Config::MAIN_OVERRIDE_REGION_SETTINGS)); SignalBlocking(m_checkbox_auto_disc_change) @@ -353,11 +353,9 @@ void GeneralPane::OnSaveConfig() Settings::Instance().SetAnalyticsEnabled(m_checkbox_enable_analytics->isChecked()); DolphinAnalytics::Instance().ReloadConfig(); #endif - Settings::Instance().SetCheatsEnabled(m_checkbox_cheats->isChecked()); Config::SetBaseOrCurrent(Config::MAIN_OVERRIDE_REGION_SETTINGS, m_checkbox_override_region_settings->isChecked()); Config::SetBase(Config::MAIN_AUTO_DISC_CHANGE, m_checkbox_auto_disc_change->isChecked()); - Config::SetBaseOrCurrent(Config::MAIN_ENABLE_CHEATS, m_checkbox_cheats->isChecked()); Settings::Instance().SetFallbackRegion( UpdateFallbackRegionFromIndex(m_combobox_fallback_region->currentIndex())); @@ -386,6 +384,13 @@ void GeneralPane::AddDescriptions() "improves performance. However, it can result in glitches and crashes." "

This setting cannot be changed while emulation is active." "

If unsure, leave this checked."); + static constexpr char TR_CHEATS_DESCRIPTION[] = QT_TR_NOOP( + "Enables the use of AR and Gecko cheat codes which can be used to modify games' behavior. " + "These codes can be configured with the Cheats Manager in the Tools menu." + "

This setting cannot be changed while emulation is active." + "

If unsure, leave this unchecked."); m_checkbox_dualcore->SetDescription(tr(TR_DUALCORE_DESCRIPTION)); + + m_checkbox_cheats->SetDescription(tr(TR_CHEATS_DESCRIPTION)); } diff --git a/Source/Core/DolphinQt/Settings/GeneralPane.h b/Source/Core/DolphinQt/Settings/GeneralPane.h index 2fc68ddc13..3c69360c75 100644 --- a/Source/Core/DolphinQt/Settings/GeneralPane.h +++ b/Source/Core/DolphinQt/Settings/GeneralPane.h @@ -43,7 +43,7 @@ private: QComboBox* m_combobox_update_track; QComboBox* m_combobox_fallback_region; ConfigBool* m_checkbox_dualcore; - QCheckBox* m_checkbox_cheats; + ConfigBool* m_checkbox_cheats; QCheckBox* m_checkbox_override_region_settings; QCheckBox* m_checkbox_auto_disc_change; #ifdef USE_DISCORD_PRESENCE From 755866b771fb086959bef621a73387322b9360f7 Mon Sep 17 00:00:00 2001 From: Dentomologist Date: Mon, 27 Nov 2023 23:17:46 -0800 Subject: [PATCH 03/10] GeneralPane: Add BalloonTip to override region settings checkbox --- Source/Core/DolphinQt/Settings/GeneralPane.cpp | 16 +++++++++------- Source/Core/DolphinQt/Settings/GeneralPane.h | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Source/Core/DolphinQt/Settings/GeneralPane.cpp b/Source/Core/DolphinQt/Settings/GeneralPane.cpp index fab903a873..23b1f0b8af 100644 --- a/Source/Core/DolphinQt/Settings/GeneralPane.cpp +++ b/Source/Core/DolphinQt/Settings/GeneralPane.cpp @@ -101,8 +101,6 @@ void GeneralPane::ConnectLayout() { connect(m_checkbox_cheats, &QCheckBox::toggled, &Settings::Instance(), &Settings::EnableCheatsChanged); - connect(m_checkbox_override_region_settings, &QCheckBox::stateChanged, this, - &GeneralPane::OnSaveConfig); connect(m_checkbox_auto_disc_change, &QCheckBox::toggled, this, &GeneralPane::OnSaveConfig); #ifdef USE_DISCORD_PRESENCE connect(m_checkbox_discord_presence, &QCheckBox::toggled, this, &GeneralPane::OnSaveConfig); @@ -148,7 +146,8 @@ void GeneralPane::CreateBasic() m_checkbox_cheats = new ConfigBool(tr("Enable Cheats"), Config::MAIN_ENABLE_CHEATS); basic_group_layout->addWidget(m_checkbox_cheats); - m_checkbox_override_region_settings = new QCheckBox(tr("Allow Mismatched Region Settings")); + m_checkbox_override_region_settings = + new ConfigBool(tr("Allow Mismatched Region Settings"), Config::MAIN_OVERRIDE_REGION_SETTINGS); basic_group_layout->addWidget(m_checkbox_override_region_settings); m_checkbox_auto_disc_change = new QCheckBox(tr("Change Discs Automatically")); @@ -263,8 +262,6 @@ void GeneralPane::LoadConfig() SignalBlocking(m_checkbox_enable_analytics) ->setChecked(Settings::Instance().IsAnalyticsEnabled()); #endif - SignalBlocking(m_checkbox_override_region_settings) - ->setChecked(Config::Get(Config::MAIN_OVERRIDE_REGION_SETTINGS)); SignalBlocking(m_checkbox_auto_disc_change) ->setChecked(Config::Get(Config::MAIN_AUTO_DISC_CHANGE)); @@ -353,8 +350,6 @@ void GeneralPane::OnSaveConfig() Settings::Instance().SetAnalyticsEnabled(m_checkbox_enable_analytics->isChecked()); DolphinAnalytics::Instance().ReloadConfig(); #endif - Config::SetBaseOrCurrent(Config::MAIN_OVERRIDE_REGION_SETTINGS, - m_checkbox_override_region_settings->isChecked()); Config::SetBase(Config::MAIN_AUTO_DISC_CHANGE, m_checkbox_auto_disc_change->isChecked()); Settings::Instance().SetFallbackRegion( UpdateFallbackRegionFromIndex(m_combobox_fallback_region->currentIndex())); @@ -389,8 +384,15 @@ void GeneralPane::AddDescriptions() "These codes can be configured with the Cheats Manager in the Tools menu." "

This setting cannot be changed while emulation is active." "

If unsure, leave this unchecked."); + static constexpr char TR_OVERRIDE_REGION_SETTINGS_DESCRIPTION[] = + QT_TR_NOOP("Lets you use languages and other region-related settings that the game may not " + "be designed for. May cause various crashes and bugs." + "

This setting cannot be changed while emulation is active." + "

If unsure, leave this unchecked."); m_checkbox_dualcore->SetDescription(tr(TR_DUALCORE_DESCRIPTION)); m_checkbox_cheats->SetDescription(tr(TR_CHEATS_DESCRIPTION)); + + m_checkbox_override_region_settings->SetDescription(tr(TR_OVERRIDE_REGION_SETTINGS_DESCRIPTION)); } diff --git a/Source/Core/DolphinQt/Settings/GeneralPane.h b/Source/Core/DolphinQt/Settings/GeneralPane.h index 3c69360c75..73a9fb0999 100644 --- a/Source/Core/DolphinQt/Settings/GeneralPane.h +++ b/Source/Core/DolphinQt/Settings/GeneralPane.h @@ -44,7 +44,7 @@ private: QComboBox* m_combobox_fallback_region; ConfigBool* m_checkbox_dualcore; ConfigBool* m_checkbox_cheats; - QCheckBox* m_checkbox_override_region_settings; + ConfigBool* m_checkbox_override_region_settings; QCheckBox* m_checkbox_auto_disc_change; #ifdef USE_DISCORD_PRESENCE QCheckBox* m_checkbox_discord_presence; From ce0ab58dc91f8dde851334e0186caaab8ff89eac Mon Sep 17 00:00:00 2001 From: Dentomologist Date: Tue, 28 Nov 2023 11:19:09 -0800 Subject: [PATCH 04/10] GeneralPane: Add BalloonTip to auto disc change checkbox --- Source/Core/DolphinQt/Settings/GeneralPane.cpp | 17 ++++++++++++----- Source/Core/DolphinQt/Settings/GeneralPane.h | 2 +- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Source/Core/DolphinQt/Settings/GeneralPane.cpp b/Source/Core/DolphinQt/Settings/GeneralPane.cpp index 23b1f0b8af..47fa351950 100644 --- a/Source/Core/DolphinQt/Settings/GeneralPane.cpp +++ b/Source/Core/DolphinQt/Settings/GeneralPane.cpp @@ -101,7 +101,6 @@ void GeneralPane::ConnectLayout() { connect(m_checkbox_cheats, &QCheckBox::toggled, &Settings::Instance(), &Settings::EnableCheatsChanged); - connect(m_checkbox_auto_disc_change, &QCheckBox::toggled, this, &GeneralPane::OnSaveConfig); #ifdef USE_DISCORD_PRESENCE connect(m_checkbox_discord_presence, &QCheckBox::toggled, this, &GeneralPane::OnSaveConfig); #endif @@ -150,7 +149,8 @@ void GeneralPane::CreateBasic() new ConfigBool(tr("Allow Mismatched Region Settings"), Config::MAIN_OVERRIDE_REGION_SETTINGS); basic_group_layout->addWidget(m_checkbox_override_region_settings); - m_checkbox_auto_disc_change = new QCheckBox(tr("Change Discs Automatically")); + m_checkbox_auto_disc_change = + new ConfigBool(tr("Change Discs Automatically"), Config::MAIN_AUTO_DISC_CHANGE); basic_group_layout->addWidget(m_checkbox_auto_disc_change); #ifdef USE_DISCORD_PRESENCE @@ -262,8 +262,6 @@ void GeneralPane::LoadConfig() SignalBlocking(m_checkbox_enable_analytics) ->setChecked(Settings::Instance().IsAnalyticsEnabled()); #endif - SignalBlocking(m_checkbox_auto_disc_change) - ->setChecked(Config::Get(Config::MAIN_AUTO_DISC_CHANGE)); #ifdef USE_DISCORD_PRESENCE SignalBlocking(m_checkbox_discord_presence) @@ -350,7 +348,6 @@ void GeneralPane::OnSaveConfig() Settings::Instance().SetAnalyticsEnabled(m_checkbox_enable_analytics->isChecked()); DolphinAnalytics::Instance().ReloadConfig(); #endif - Config::SetBase(Config::MAIN_AUTO_DISC_CHANGE, m_checkbox_auto_disc_change->isChecked()); Settings::Instance().SetFallbackRegion( UpdateFallbackRegionFromIndex(m_combobox_fallback_region->currentIndex())); @@ -389,10 +386,20 @@ void GeneralPane::AddDescriptions() "be designed for. May cause various crashes and bugs." "

This setting cannot be changed while emulation is active." "

If unsure, leave this unchecked."); + static constexpr char TR_AUTO_DISC_CHANGE_DESCRIPTION[] = QT_TR_NOOP( + "Automatically changes the game disc when requested by games with two discs. This feature " + "requires the game to be launched in one of the following ways:" + "
- From the game list, with both discs being present in the game list." + "
- With File > Open or the command line interface, with the paths to both discs being " + "provided." + "
- By launching an M3U file with File > Open or the command line interface." + "

If unsure, leave this unchecked."); m_checkbox_dualcore->SetDescription(tr(TR_DUALCORE_DESCRIPTION)); m_checkbox_cheats->SetDescription(tr(TR_CHEATS_DESCRIPTION)); m_checkbox_override_region_settings->SetDescription(tr(TR_OVERRIDE_REGION_SETTINGS_DESCRIPTION)); + + m_checkbox_auto_disc_change->SetDescription(tr(TR_AUTO_DISC_CHANGE_DESCRIPTION)); } diff --git a/Source/Core/DolphinQt/Settings/GeneralPane.h b/Source/Core/DolphinQt/Settings/GeneralPane.h index 73a9fb0999..1fd0ab66b7 100644 --- a/Source/Core/DolphinQt/Settings/GeneralPane.h +++ b/Source/Core/DolphinQt/Settings/GeneralPane.h @@ -45,7 +45,7 @@ private: ConfigBool* m_checkbox_dualcore; ConfigBool* m_checkbox_cheats; ConfigBool* m_checkbox_override_region_settings; - QCheckBox* m_checkbox_auto_disc_change; + ConfigBool* m_checkbox_auto_disc_change; #ifdef USE_DISCORD_PRESENCE QCheckBox* m_checkbox_discord_presence; #endif From 809b8a683fac21122431845b02d3dba337f28023 Mon Sep 17 00:00:00 2001 From: Dentomologist Date: Sat, 18 May 2024 12:47:22 -0700 Subject: [PATCH 05/10] GeneralPane: Add BalloonTip to discord presence checkbox --- Source/Core/DolphinQt/Settings/GeneralPane.cpp | 14 +++++++++++++- Source/Core/DolphinQt/Settings/GeneralPane.h | 3 ++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinQt/Settings/GeneralPane.cpp b/Source/Core/DolphinQt/Settings/GeneralPane.cpp index 47fa351950..7f9c9e0572 100644 --- a/Source/Core/DolphinQt/Settings/GeneralPane.cpp +++ b/Source/Core/DolphinQt/Settings/GeneralPane.cpp @@ -25,6 +25,7 @@ #include "Core/System.h" #include "DolphinQt/Config/ConfigControls/ConfigBool.h" +#include "DolphinQt/Config/ToolTipControls/ToolTipCheckBox.h" #include "DolphinQt/QtUtils/ModalMessageBox.h" #include "DolphinQt/QtUtils/NonDefaultQPushButton.h" #include "DolphinQt/QtUtils/SetWindowDecorations.h" @@ -154,7 +155,7 @@ void GeneralPane::CreateBasic() basic_group_layout->addWidget(m_checkbox_auto_disc_change); #ifdef USE_DISCORD_PRESENCE - m_checkbox_discord_presence = new QCheckBox(tr("Show Current Game on Discord")); + m_checkbox_discord_presence = new ToolTipCheckBox(tr("Show Current Game on Discord")); basic_group_layout->addWidget(m_checkbox_discord_presence); #endif @@ -394,6 +395,13 @@ void GeneralPane::AddDescriptions() "provided." "
- By launching an M3U file with File > Open or the command line interface." "

If unsure, leave this unchecked."); +#ifdef USE_DISCORD_PRESENCE + static constexpr char TR_DISCORD_PRESENCE_DESCRIPTION[] = + QT_TR_NOOP("Shows which game is active and the duration of your current play session in your " + "Discord status." + "

This setting cannot be changed while emulation is active." + "

If unsure, leave this checked."); +#endif m_checkbox_dualcore->SetDescription(tr(TR_DUALCORE_DESCRIPTION)); @@ -402,4 +410,8 @@ void GeneralPane::AddDescriptions() m_checkbox_override_region_settings->SetDescription(tr(TR_OVERRIDE_REGION_SETTINGS_DESCRIPTION)); m_checkbox_auto_disc_change->SetDescription(tr(TR_AUTO_DISC_CHANGE_DESCRIPTION)); + +#ifdef USE_DISCORD_PRESENCE + m_checkbox_discord_presence->SetDescription(tr(TR_DISCORD_PRESENCE_DESCRIPTION)); +#endif } diff --git a/Source/Core/DolphinQt/Settings/GeneralPane.h b/Source/Core/DolphinQt/Settings/GeneralPane.h index 1fd0ab66b7..1c4febcd6e 100644 --- a/Source/Core/DolphinQt/Settings/GeneralPane.h +++ b/Source/Core/DolphinQt/Settings/GeneralPane.h @@ -13,6 +13,7 @@ class QPushButton; class QRadioButton; class QSlider; class QVBoxLayout; +class ToolTipCheckBox; namespace Core { @@ -47,7 +48,7 @@ private: ConfigBool* m_checkbox_override_region_settings; ConfigBool* m_checkbox_auto_disc_change; #ifdef USE_DISCORD_PRESENCE - QCheckBox* m_checkbox_discord_presence; + ToolTipCheckBox* m_checkbox_discord_presence; #endif QLabel* m_label_speedlimit; From 427b85f2a15522dba811e3d151d38da4c3d22bf8 Mon Sep 17 00:00:00 2001 From: Dentomologist Date: Mon, 22 Apr 2024 20:38:04 -0700 Subject: [PATCH 06/10] GeneralPane: Add BalloonTip to speed limit combobox --- Source/Core/DolphinQt/Settings/GeneralPane.cpp | 13 ++++++++++++- Source/Core/DolphinQt/Settings/GeneralPane.h | 4 ++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Source/Core/DolphinQt/Settings/GeneralPane.cpp b/Source/Core/DolphinQt/Settings/GeneralPane.cpp index 7f9c9e0572..6740bfbd9d 100644 --- a/Source/Core/DolphinQt/Settings/GeneralPane.cpp +++ b/Source/Core/DolphinQt/Settings/GeneralPane.cpp @@ -26,6 +26,7 @@ #include "DolphinQt/Config/ConfigControls/ConfigBool.h" #include "DolphinQt/Config/ToolTipControls/ToolTipCheckBox.h" +#include "DolphinQt/Config/ToolTipControls/ToolTipComboBox.h" #include "DolphinQt/QtUtils/ModalMessageBox.h" #include "DolphinQt/QtUtils/NonDefaultQPushButton.h" #include "DolphinQt/QtUtils/SetWindowDecorations.h" @@ -164,7 +165,7 @@ void GeneralPane::CreateBasic() speed_limit_layout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow); basic_group_layout->addLayout(speed_limit_layout); - m_combobox_speedlimit = new QComboBox(); + m_combobox_speedlimit = new ToolTipComboBox(); m_combobox_speedlimit->addItem(tr("Unlimited")); for (int i = 10; i <= 200; i += 10) // from 10% to 200% @@ -402,6 +403,13 @@ void GeneralPane::AddDescriptions() "

This setting cannot be changed while emulation is active." "

If unsure, leave this checked."); #endif + static constexpr char TR_SPEEDLIMIT_DESCRIPTION[] = QT_TR_NOOP( + "Sets the maximum time scale of emulation. Values higher than 100% will accelerate emulated " + "time by processing faster than the original hardware, while values lower than 100% will " + "slow emulated time. Unlimited will emulate as fast as your host hardware can run." + "

Higher speeds are proportionally more costly to emulate. Depending on the title, " + "your settings, and your host hardware, some of these values may not be sustainable." + "

If unsure, select 100%."); m_checkbox_dualcore->SetDescription(tr(TR_DUALCORE_DESCRIPTION)); @@ -414,4 +422,7 @@ void GeneralPane::AddDescriptions() #ifdef USE_DISCORD_PRESENCE m_checkbox_discord_presence->SetDescription(tr(TR_DISCORD_PRESENCE_DESCRIPTION)); #endif + + m_combobox_speedlimit->SetTitle(tr("Speed Limit")); + 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 1c4febcd6e..77f4303e55 100644 --- a/Source/Core/DolphinQt/Settings/GeneralPane.h +++ b/Source/Core/DolphinQt/Settings/GeneralPane.h @@ -14,6 +14,7 @@ class QRadioButton; class QSlider; class QVBoxLayout; class ToolTipCheckBox; +class ToolTipComboBox; namespace Core { @@ -40,7 +41,7 @@ private: // Widgets QVBoxLayout* m_main_layout; - QComboBox* m_combobox_speedlimit; + ToolTipComboBox* m_combobox_speedlimit; QComboBox* m_combobox_update_track; QComboBox* m_combobox_fallback_region; ConfigBool* m_checkbox_dualcore; @@ -50,7 +51,6 @@ private: #ifdef USE_DISCORD_PRESENCE ToolTipCheckBox* m_checkbox_discord_presence; #endif - QLabel* m_label_speedlimit; // Analytics related #if defined(USE_ANALYTICS) && USE_ANALYTICS From fa4803f38aba99e2e24cc7e2c809b95c1180cb9b Mon Sep 17 00:00:00 2001 From: Dentomologist Date: Thu, 25 Apr 2024 20:32:16 -0700 Subject: [PATCH 07/10] GeneralPane: Add BalloonTip to auto update combobox --- .../Core/DolphinQt/Settings/GeneralPane.cpp | 27 ++++++++++++++++++- Source/Core/DolphinQt/Settings/GeneralPane.h | 2 +- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinQt/Settings/GeneralPane.cpp b/Source/Core/DolphinQt/Settings/GeneralPane.cpp index 6740bfbd9d..e8bb70afa7 100644 --- a/Source/Core/DolphinQt/Settings/GeneralPane.cpp +++ b/Source/Core/DolphinQt/Settings/GeneralPane.cpp @@ -192,7 +192,7 @@ void GeneralPane::CreateAutoUpdate() auto_update_group_layout->setFormAlignment(Qt::AlignLeft | Qt::AlignTop); auto_update_group_layout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow); - m_combobox_update_track = new QComboBox(this); + m_combobox_update_track = new ToolTipComboBox(); auto_update_group_layout->addRow(tr("&Auto Update:"), m_combobox_update_track); @@ -410,6 +410,25 @@ void GeneralPane::AddDescriptions() "

Higher speeds are proportionally more costly to emulate. Depending on the title, " "your settings, and your host hardware, some of these values may not be sustainable." "

If unsure, select 100%."); + 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 " + "and ask you if you want to update." + "

The Dev track has the latest version of Dolphin which often updates multiple times " + "per day. Select this track if you want the newest features and fixes." + "

The Releases track has an update every few months. Some reasons you might prefer to " + "use this track:" + "
- You prefer using versions that have had additional testing." + "
- NetPlay requires players to have the same Dolphin version, and the latest Release " + "version will have the most players to match with." + "
- You frequently use Dolphin's savestate system, which doesn't guarantee backward " + "compatibility of savestates between Dolphin versions. If this applies to you, make sure you " + "make an in-game save before updating (i.e. save your game in the same way you would on a " + "physical GameCube or Wii), then load the in-game save after updating Dolphin and before " + "making any new savestates." + "

Selecting \"Don't Update\" will prevent Dolphin from automatically checking for " + "updates." + "

If unsure, select Releases."); m_checkbox_dualcore->SetDescription(tr(TR_DUALCORE_DESCRIPTION)); @@ -425,4 +444,10 @@ void GeneralPane::AddDescriptions() m_combobox_speedlimit->SetTitle(tr("Speed Limit")); m_combobox_speedlimit->SetDescription(tr(TR_SPEEDLIMIT_DESCRIPTION)); + + if (AutoUpdateChecker::SystemSupportsAutoUpdates()) + { + m_combobox_update_track->SetTitle(tr("Auto Update")); + m_combobox_update_track->SetDescription(tr(TR_UPDATE_TRACK_DESCRIPTION)); + } } diff --git a/Source/Core/DolphinQt/Settings/GeneralPane.h b/Source/Core/DolphinQt/Settings/GeneralPane.h index 77f4303e55..facc651648 100644 --- a/Source/Core/DolphinQt/Settings/GeneralPane.h +++ b/Source/Core/DolphinQt/Settings/GeneralPane.h @@ -42,7 +42,7 @@ private: // Widgets QVBoxLayout* m_main_layout; ToolTipComboBox* m_combobox_speedlimit; - QComboBox* m_combobox_update_track; + ToolTipComboBox* m_combobox_update_track; QComboBox* m_combobox_fallback_region; ConfigBool* m_checkbox_dualcore; ConfigBool* m_checkbox_cheats; From bfbc4c8cc7d1cd3640efa4c105d02e9054e73350 Mon Sep 17 00:00:00 2001 From: Dentomologist Date: Thu, 25 Apr 2024 20:52:07 -0700 Subject: [PATCH 08/10] GeneralPane: Add BalloonTip to fallback region combobox --- Source/Core/DolphinQt/Settings/GeneralPane.cpp | 14 +++++++------- Source/Core/DolphinQt/Settings/GeneralPane.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/Core/DolphinQt/Settings/GeneralPane.cpp b/Source/Core/DolphinQt/Settings/GeneralPane.cpp index e8bb70afa7..a80c2c176c 100644 --- a/Source/Core/DolphinQt/Settings/GeneralPane.cpp +++ b/Source/Core/DolphinQt/Settings/GeneralPane.cpp @@ -213,17 +213,11 @@ void GeneralPane::CreateFallbackRegion() fallback_region_dropdown_layout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow); fallback_region_group_layout->addLayout(fallback_region_dropdown_layout); - m_combobox_fallback_region = new QComboBox(this); + m_combobox_fallback_region = new ToolTipComboBox(); fallback_region_dropdown_layout->addRow(tr("Fallback Region:"), m_combobox_fallback_region); for (const QString& option : {tr("NTSC-J"), tr("NTSC-U"), tr("PAL"), tr("NTSC-K")}) m_combobox_fallback_region->addItem(option); - - auto* fallback_region_description = - new QLabel(tr("Dolphin will use this for titles whose region cannot be determined " - "automatically.")); - fallback_region_description->setWordWrap(true); - fallback_region_group_layout->addWidget(fallback_region_description); } #if defined(USE_ANALYTICS) && USE_ANALYTICS @@ -429,6 +423,9 @@ void GeneralPane::AddDescriptions() "

Selecting \"Don't Update\" will prevent Dolphin from automatically checking for " "updates." "

If unsure, select Releases."); + static constexpr char TR_FALLBACK_REGION_DESCRIPTION[] = + QT_TR_NOOP("Sets the region used for titles whose region cannot be determined automatically." + "

This setting cannot be changed while emulation is active."); m_checkbox_dualcore->SetDescription(tr(TR_DUALCORE_DESCRIPTION)); @@ -450,4 +447,7 @@ void GeneralPane::AddDescriptions() m_combobox_update_track->SetTitle(tr("Auto Update")); m_combobox_update_track->SetDescription(tr(TR_UPDATE_TRACK_DESCRIPTION)); } + + m_combobox_fallback_region->SetTitle(tr("Fallback Region")); + m_combobox_fallback_region->SetDescription(tr(TR_FALLBACK_REGION_DESCRIPTION)); } diff --git a/Source/Core/DolphinQt/Settings/GeneralPane.h b/Source/Core/DolphinQt/Settings/GeneralPane.h index facc651648..ba60cddf7e 100644 --- a/Source/Core/DolphinQt/Settings/GeneralPane.h +++ b/Source/Core/DolphinQt/Settings/GeneralPane.h @@ -43,7 +43,7 @@ private: QVBoxLayout* m_main_layout; ToolTipComboBox* m_combobox_speedlimit; ToolTipComboBox* m_combobox_update_track; - QComboBox* m_combobox_fallback_region; + ToolTipComboBox* m_combobox_fallback_region; ConfigBool* m_checkbox_dualcore; ConfigBool* m_checkbox_cheats; ConfigBool* m_checkbox_override_region_settings; From 5512b68020268bbc57e4a44f18ddff021e6ba377 Mon Sep 17 00:00:00 2001 From: Dentomologist Date: Thu, 25 Apr 2024 23:08:51 -0700 Subject: [PATCH 09/10] GeneralPane: Add BalloonTip to enable analytics checkbox --- Source/Core/DolphinQt/Settings/GeneralPane.cpp | 10 +++++++++- Source/Core/DolphinQt/Settings/GeneralPane.h | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinQt/Settings/GeneralPane.cpp b/Source/Core/DolphinQt/Settings/GeneralPane.cpp index a80c2c176c..8b2962fe6e 100644 --- a/Source/Core/DolphinQt/Settings/GeneralPane.cpp +++ b/Source/Core/DolphinQt/Settings/GeneralPane.cpp @@ -228,7 +228,7 @@ void GeneralPane::CreateAnalytics() analytics_group->setLayout(analytics_group_layout); m_main_layout->addWidget(analytics_group); - m_checkbox_enable_analytics = new QCheckBox(tr("Enable Usage Statistics Reporting")); + m_checkbox_enable_analytics = new ToolTipCheckBox(tr("Enable Usage Statistics Reporting")); m_button_generate_new_identity = new NonDefaultQPushButton(tr("Generate a New Statistics Identity")); analytics_group_layout->addWidget(m_checkbox_enable_analytics); @@ -426,6 +426,12 @@ void GeneralPane::AddDescriptions() static constexpr char TR_FALLBACK_REGION_DESCRIPTION[] = QT_TR_NOOP("Sets the region used for titles whose region cannot be determined automatically." "

This setting cannot be changed while emulation is active."); + static constexpr char TR_ENABLE_ANALYTICS_DESCRIPTION[] = QT_TR_NOOP( + "If selected, Dolphin can collect data on its performance, feature usage, emulated games, " + "and configuration, as well as data on your system's hardware and operating system." + "

No private data is ever collected. This data helps us understand how people and " + "emulated games use Dolphin and prioritize our efforts. It also helps us identify rare " + "configurations that are causing bugs, performance and stability issues."); m_checkbox_dualcore->SetDescription(tr(TR_DUALCORE_DESCRIPTION)); @@ -450,4 +456,6 @@ void GeneralPane::AddDescriptions() m_combobox_fallback_region->SetTitle(tr("Fallback Region")); m_combobox_fallback_region->SetDescription(tr(TR_FALLBACK_REGION_DESCRIPTION)); + + m_checkbox_enable_analytics->SetDescription(tr(TR_ENABLE_ANALYTICS_DESCRIPTION)); } diff --git a/Source/Core/DolphinQt/Settings/GeneralPane.h b/Source/Core/DolphinQt/Settings/GeneralPane.h index ba60cddf7e..8b968f9c4a 100644 --- a/Source/Core/DolphinQt/Settings/GeneralPane.h +++ b/Source/Core/DolphinQt/Settings/GeneralPane.h @@ -58,6 +58,6 @@ private: void GenerateNewIdentity(); QPushButton* m_button_generate_new_identity; - QCheckBox* m_checkbox_enable_analytics; + ToolTipCheckBox* m_checkbox_enable_analytics; #endif }; From 6a735f3758a58bae1b6c05621f728a9707715a46 Mon Sep 17 00:00:00 2001 From: Dentomologist Date: Thu, 25 Apr 2024 23:10:38 -0700 Subject: [PATCH 10/10] GeneralPane: Add BalloonTip to generate new identity checkbox --- Source/Core/DolphinQt/Settings/GeneralPane.cpp | 11 ++++++++--- Source/Core/DolphinQt/Settings/GeneralPane.h | 3 ++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Source/Core/DolphinQt/Settings/GeneralPane.cpp b/Source/Core/DolphinQt/Settings/GeneralPane.cpp index 8b2962fe6e..55dc4f0799 100644 --- a/Source/Core/DolphinQt/Settings/GeneralPane.cpp +++ b/Source/Core/DolphinQt/Settings/GeneralPane.cpp @@ -27,8 +27,8 @@ #include "DolphinQt/Config/ConfigControls/ConfigBool.h" #include "DolphinQt/Config/ToolTipControls/ToolTipCheckBox.h" #include "DolphinQt/Config/ToolTipControls/ToolTipComboBox.h" +#include "DolphinQt/Config/ToolTipControls/ToolTipPushButton.h" #include "DolphinQt/QtUtils/ModalMessageBox.h" -#include "DolphinQt/QtUtils/NonDefaultQPushButton.h" #include "DolphinQt/QtUtils/SetWindowDecorations.h" #include "DolphinQt/QtUtils/SignalBlocking.h" #include "DolphinQt/Settings.h" @@ -229,8 +229,7 @@ void GeneralPane::CreateAnalytics() m_main_layout->addWidget(analytics_group); m_checkbox_enable_analytics = new ToolTipCheckBox(tr("Enable Usage Statistics Reporting")); - m_button_generate_new_identity = - new NonDefaultQPushButton(tr("Generate a New Statistics Identity")); + m_button_generate_new_identity = new ToolTipPushButton(tr("Generate a New Statistics Identity")); analytics_group_layout->addWidget(m_checkbox_enable_analytics); analytics_group_layout->addWidget(m_button_generate_new_identity); } @@ -432,6 +431,9 @@ void GeneralPane::AddDescriptions() "

No private data is ever collected. This data helps us understand how people and " "emulated games use Dolphin and prioritize our efforts. It also helps us identify rare " "configurations that are causing bugs, performance and stability issues."); + static constexpr char TR_GENERATE_NEW_IDENTITY_DESCRIPTION[] = + QT_TR_NOOP("Generate a new anonymous ID for your usage statistics. This will cause any " + "future statistics to be unassociated with your previous statistics."); m_checkbox_dualcore->SetDescription(tr(TR_DUALCORE_DESCRIPTION)); @@ -458,4 +460,7 @@ void GeneralPane::AddDescriptions() m_combobox_fallback_region->SetDescription(tr(TR_FALLBACK_REGION_DESCRIPTION)); m_checkbox_enable_analytics->SetDescription(tr(TR_ENABLE_ANALYTICS_DESCRIPTION)); + + m_button_generate_new_identity->SetTitle(tr("Generate a New Statistics Identity")); + m_button_generate_new_identity->SetDescription(tr(TR_GENERATE_NEW_IDENTITY_DESCRIPTION)); } diff --git a/Source/Core/DolphinQt/Settings/GeneralPane.h b/Source/Core/DolphinQt/Settings/GeneralPane.h index 8b968f9c4a..ffe850491b 100644 --- a/Source/Core/DolphinQt/Settings/GeneralPane.h +++ b/Source/Core/DolphinQt/Settings/GeneralPane.h @@ -15,6 +15,7 @@ class QSlider; class QVBoxLayout; class ToolTipCheckBox; class ToolTipComboBox; +class ToolTipPushButton; namespace Core { @@ -57,7 +58,7 @@ private: void CreateAnalytics(); void GenerateNewIdentity(); - QPushButton* m_button_generate_new_identity; + ToolTipPushButton* m_button_generate_new_identity; ToolTipCheckBox* m_checkbox_enable_analytics; #endif };