From 16cdd0a96132e410dd08b7a2afdc2a94e6252e8f Mon Sep 17 00:00:00 2001 From: Dentomologist Date: Sun, 12 Nov 2023 00:03:00 -0800 Subject: [PATCH] InterfacePane: Add BalloonTip to use panic handlers checkbox --- Source/Core/DolphinQt/Settings/InterfacePane.cpp | 14 +++++++++----- Source/Core/DolphinQt/Settings/InterfacePane.h | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Source/Core/DolphinQt/Settings/InterfacePane.cpp b/Source/Core/DolphinQt/Settings/InterfacePane.cpp index 554d55d386..dfd49f4946 100644 --- a/Source/Core/DolphinQt/Settings/InterfacePane.cpp +++ b/Source/Core/DolphinQt/Settings/InterfacePane.cpp @@ -183,7 +183,8 @@ void InterfacePane::CreateInGame() m_checkbox_top_window = new ConfigBool(tr("Keep Window on Top"), Config::MAIN_KEEP_WINDOW_ON_TOP); m_checkbox_confirm_on_stop = new ConfigBool(tr("Confirm on Stop"), Config::MAIN_CONFIRM_ON_STOP); - m_checkbox_use_panic_handlers = new QCheckBox(tr("Use Panic Handlers")); + m_checkbox_use_panic_handlers = + new ConfigBool(tr("Use Panic Handlers"), Config::MAIN_USE_PANIC_HANDLERS); m_checkbox_enable_osd = new QCheckBox(tr("Show On-Screen Display Messages")); m_checkbox_show_active_title = new QCheckBox(tr("Show Active Title in Window Title")); m_checkbox_pause_on_focus_lost = new QCheckBox(tr("Pause on Focus Loss")); @@ -241,7 +242,6 @@ void InterfacePane::ConnectLayout() [this]() { OnLanguageChanged(); }); connect(m_checkbox_top_window, &QCheckBox::toggled, &Settings::Instance(), &Settings::KeepWindowOnTopChanged); - connect(m_checkbox_use_panic_handlers, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig); connect(m_checkbox_show_active_title, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig); connect(m_checkbox_enable_osd, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig); connect(m_checkbox_pause_on_focus_lost, &QCheckBox::toggled, this, &InterfacePane::OnSaveConfig); @@ -299,8 +299,6 @@ void InterfacePane::LoadConfig() SignalBlocking(m_combobox_userstyle)->setCurrentIndex(index); // Render Window Options - SignalBlocking(m_checkbox_use_panic_handlers) - ->setChecked(Config::Get(Config::MAIN_USE_PANIC_HANDLERS)); SignalBlocking(m_checkbox_enable_osd)->setChecked(Config::Get(Config::MAIN_OSD_MESSAGES)); SignalBlocking(m_checkbox_show_active_title) ->setChecked(Config::Get(Config::MAIN_SHOW_ACTIVE_TITLE)); @@ -329,7 +327,6 @@ void InterfacePane::OnSaveConfig() Settings::Instance().ApplyStyle(); // Render Window Options - Config::SetBase(Config::MAIN_USE_PANIC_HANDLERS, m_checkbox_use_panic_handlers->isChecked()); Config::SetBase(Config::MAIN_OSD_MESSAGES, m_checkbox_enable_osd->isChecked()); Config::SetBase(Config::MAIN_SHOW_ACTIVE_TITLE, m_checkbox_show_active_title->isChecked()); Config::SetBase(Config::MAIN_PAUSE_ON_FOCUS_LOST, m_checkbox_pause_on_focus_lost->isChecked()); @@ -390,6 +387,11 @@ void InterfacePane::AddDescriptions() static constexpr char TR_CONFIRM_ON_STOP_DESCRIPTION[] = QT_TR_NOOP("Prompts you to confirm that you want to end emulation when you press Stop." "

If unsure, leave this checked."); + static constexpr char TR_USE_PANIC_HANDLERS_DESCRIPTION[] = + QT_TR_NOOP("In the event of an error, Dolphin will halt to inform you of the error and " + "present choices on how to proceed. With this option disabled, Dolphin will " + "\"ignore\" all errors. Emulation will not be halted and you will not be notified." + "

If unsure, leave this checked."); m_checkbox_use_builtin_title_database->SetDescription(tr(TR_TITLE_DATABASE_DESCRIPTION)); @@ -408,4 +410,6 @@ void InterfacePane::AddDescriptions() m_checkbox_disable_screensaver->SetDescription(tr(TR_DISABLE_SCREENSAVER_DESCRIPTION)); m_checkbox_confirm_on_stop->SetDescription(tr(TR_CONFIRM_ON_STOP_DESCRIPTION)); + + m_checkbox_use_panic_handlers->SetDescription(tr(TR_USE_PANIC_HANDLERS_DESCRIPTION)); } diff --git a/Source/Core/DolphinQt/Settings/InterfacePane.h b/Source/Core/DolphinQt/Settings/InterfacePane.h index 761dae880a..38bea683af 100644 --- a/Source/Core/DolphinQt/Settings/InterfacePane.h +++ b/Source/Core/DolphinQt/Settings/InterfacePane.h @@ -48,7 +48,7 @@ private: ConfigBool* m_checkbox_disable_screensaver; ConfigBool* m_checkbox_confirm_on_stop; - QCheckBox* m_checkbox_use_panic_handlers; + ConfigBool* m_checkbox_use_panic_handlers; QCheckBox* m_checkbox_enable_osd; QCheckBox* m_checkbox_show_active_title; QCheckBox* m_checkbox_pause_on_focus_lost;