diff --git a/Source/Core/Core/Config/MainSettings.cpp b/Source/Core/Core/Config/MainSettings.cpp index a45c014262..3a89e2807b 100644 --- a/Source/Core/Core/Config/MainSettings.cpp +++ b/Source/Core/Core/Config/MainSettings.cpp @@ -398,6 +398,7 @@ const Info MAIN_SHOW_CURSOR{{System::Main, "Interface", "CursorVisib ShowCursor::OnMovement}; const Info MAIN_LOCK_CURSOR{{System::Main, "Interface", "LockCursor"}, false}; const Info MAIN_INTERFACE_LANGUAGE{{System::Main, "Interface", "LanguageCode"}, ""}; +const Info MAIN_STATIC_TITLE{{System::Main, "Interface", "StaticTitle"}, false}; const Info MAIN_SHOW_ACTIVE_TITLE{{System::Main, "Interface", "ShowActiveTitle"}, true}; const Info MAIN_USE_BUILT_IN_TITLE_DATABASE{ {System::Main, "Interface", "UseBuiltinTitleDatabase"}, true}; diff --git a/Source/Core/Core/Config/MainSettings.h b/Source/Core/Core/Config/MainSettings.h index d7e78bf6e9..fe622c1c74 100644 --- a/Source/Core/Core/Config/MainSettings.h +++ b/Source/Core/Core/Config/MainSettings.h @@ -245,6 +245,7 @@ extern const Info MAIN_SHOW_CURSOR; extern const Info MAIN_LOCK_CURSOR; extern const Info MAIN_INTERFACE_LANGUAGE; +extern const Info MAIN_STATIC_TITLE; extern const Info MAIN_SHOW_ACTIVE_TITLE; extern const Info MAIN_USE_BUILT_IN_TITLE_DATABASE; extern const Info MAIN_THEME_NAME; diff --git a/Source/Core/Core/Core.cpp b/Source/Core/Core/Core.cpp index bc6289af97..5212ff45ab 100644 --- a/Source/Core/Core/Core.cpp +++ b/Source/Core/Core/Core.cpp @@ -913,7 +913,12 @@ void UpdateTitle(Core::System& system) g_video_backend->GetDisplayName(), Config::Get(Config::MAIN_DSP_HLE) ? "HLE" : "LLE"); std::string message = fmt::format("{} | {}", Common::GetScmRevStr(), SSettings); - if (Config::Get(Config::MAIN_SHOW_ACTIVE_TITLE)) + + if (Config::Get(Config::MAIN_STATIC_TITLE)) + { + message = Common::GetStringT("Dolphin Render Window"); + } + else if (Config::Get(Config::MAIN_SHOW_ACTIVE_TITLE)) { const std::string& title = SConfig::GetInstance().GetTitleDescription(); if (!title.empty()) diff --git a/Source/Core/DolphinQt/Settings/InterfacePane.cpp b/Source/Core/DolphinQt/Settings/InterfacePane.cpp index e52fb69200..77736661c5 100644 --- a/Source/Core/DolphinQt/Settings/InterfacePane.cpp +++ b/Source/Core/DolphinQt/Settings/InterfacePane.cpp @@ -189,6 +189,7 @@ void InterfacePane::CreateInGame() new ConfigBool(tr("Use Panic Handlers"), Config::MAIN_USE_PANIC_HANDLERS); m_checkbox_enable_osd = new ConfigBool(tr("Show On-Screen Display Messages"), Config::MAIN_OSD_MESSAGES); + m_checkbox_static_title = new ConfigBool(tr("Static Window Title"), Config::MAIN_STATIC_TITLE); m_checkbox_show_active_title = new ConfigBool(tr("Show Active Title in Window Title"), Config::MAIN_SHOW_ACTIVE_TITLE); m_checkbox_pause_on_focus_lost = @@ -219,6 +220,7 @@ void InterfacePane::CreateInGame() groupbox_layout->addWidget(m_checkbox_confirm_on_stop); groupbox_layout->addWidget(m_checkbox_use_panic_handlers); groupbox_layout->addWidget(m_checkbox_enable_osd); + groupbox_layout->addWidget(m_checkbox_static_title); groupbox_layout->addWidget(m_checkbox_show_active_title); groupbox_layout->addWidget(m_checkbox_pause_on_focus_lost); groupbox_layout->addWidget(mouse_groupbox); @@ -227,6 +229,7 @@ void InterfacePane::CreateInGame() #else m_checkbox_lock_mouse->hide(); #endif + UpdateShowActiveTitleEnabled(); } void InterfacePane::ConnectLayout() @@ -253,6 +256,8 @@ void InterfacePane::ConnectLayout() &Settings::CursorVisibilityChanged); connect(m_checkbox_lock_mouse, &QCheckBox::toggled, &Settings::Instance(), &Settings::LockCursorChanged); + connect(m_checkbox_static_title, &QCheckBox::stateChanged, + [this](int) { UpdateShowActiveTitleEnabled(); }); } void InterfacePane::UpdateShowDebuggingCheckbox() @@ -353,6 +358,9 @@ void InterfacePane::AddDescriptions() QT_TR_NOOP("Shows on-screen display messages over the render window. These messages " "disappear after several seconds." "

If unsure, leave this checked."); + static constexpr char TR_STATIC_WINDOW_TITLE[] = + QT_TR_NOOP("The render window's title will always be \"Dolphin Render Window\"." + "

If unsure, leave this unchecked."); static constexpr char TR_SHOW_ACTIVE_TITLE_DESCRIPTION[] = QT_TR_NOOP("Shows the active game title in the render window's title bar." "

If unsure, leave this checked."); @@ -400,6 +408,8 @@ void InterfacePane::AddDescriptions() m_checkbox_enable_osd->SetDescription(tr(TR_ENABLE_OSD_DESCRIPTION)); + m_checkbox_static_title->SetDescription(tr(TR_STATIC_WINDOW_TITLE)); + m_checkbox_show_active_title->SetDescription(tr(TR_SHOW_ACTIVE_TITLE_DESCRIPTION)); m_checkbox_pause_on_focus_lost->SetDescription(tr(TR_PAUSE_ON_FOCUS_LOST_DESCRIPTION)); @@ -415,3 +425,13 @@ void InterfacePane::AddDescriptions() m_combobox_userstyle->SetTitle(tr("Style")); m_combobox_userstyle->SetDescription(tr(TR_USER_STYLE_DESCRIPTION)); } + +void InterfacePane::UpdateShowActiveTitleEnabled() +{ + + const bool enabled = m_checkbox_static_title->isChecked(); + + if (enabled) + m_checkbox_show_active_title->setChecked(false); + m_checkbox_show_active_title->setEnabled(!enabled); +} diff --git a/Source/Core/DolphinQt/Settings/InterfacePane.h b/Source/Core/DolphinQt/Settings/InterfacePane.h index 90a81d2114..f094653a32 100644 --- a/Source/Core/DolphinQt/Settings/InterfacePane.h +++ b/Source/Core/DolphinQt/Settings/InterfacePane.h @@ -29,6 +29,7 @@ private: void LoadUserStyle(); void OnUserStyleChanged(); void OnLanguageChanged(); + void UpdateShowActiveTitleEnabled(); QVBoxLayout* m_main_layout; ConfigStringChoice* m_combobox_language; @@ -46,6 +47,7 @@ private: ConfigBool* m_checkbox_confirm_on_stop; ConfigBool* m_checkbox_use_panic_handlers; ConfigBool* m_checkbox_enable_osd; + ConfigBool* m_checkbox_static_title; ConfigBool* m_checkbox_show_active_title; ConfigBool* m_checkbox_pause_on_focus_lost; ConfigRadioInt* m_radio_cursor_visible_movement;