diff --git a/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp b/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp index 0ffc29cda9..6801278563 100644 --- a/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp +++ b/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp @@ -206,7 +206,6 @@ void GeneralWidget::BackendWarning() void GeneralWidget::OnEmulationStateChanged(bool running) { m_backend_combo->setEnabled(!running); - m_render_main_window->setEnabled(!running); m_enable_fullscreen->setEnabled(!running); const bool supports_adapters = !g_backend_info.Adapters.empty(); diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp index 62b9fa55a6..9387b13300 100644 --- a/Source/Core/DolphinQt/MainWindow.cpp +++ b/Source/Core/DolphinQt/MainWindow.cpp @@ -1546,8 +1546,7 @@ void MainWindow::NetPlayInit() Discord::InitNetPlayFunctionality(*m_netplay_discord); m_netplay_discord->Start(); #endif - connect(&Settings::Instance(), &Settings::ConfigChanged, this, - &MainWindow::UpdateScreenSaverInhibition); + connect(&Settings::Instance(), &Settings::ConfigChanged, this, &MainWindow::OnConfigChanged); connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, &MainWindow::UpdateScreenSaverInhibition); } @@ -1680,6 +1679,24 @@ void MainWindow::NetPlayQuit() #endif } +void MainWindow::OnConfigChanged() +{ + UpdateScreenSaverInhibition(); + + if (m_render_widget->isVisible()) + { + const bool is_rendering_to_main = m_render_window == nullptr; + + const bool render_to_main_window = Config::Get(Config::MAIN_RENDER_TO_MAIN); + + if (is_rendering_to_main != render_to_main_window) + { + HideRenderWidget(); + ShowRenderWidget(render_to_main_window); + } + } +} + void MainWindow::UpdateScreenSaverInhibition() { const bool inhibit = Config::Get(Config::MAIN_DISABLE_SCREENSAVER) && diff --git a/Source/Core/DolphinQt/MainWindow.h b/Source/Core/DolphinQt/MainWindow.h index be3761ca81..7eb6a0cfa6 100644 --- a/Source/Core/DolphinQt/MainWindow.h +++ b/Source/Core/DolphinQt/MainWindow.h @@ -219,6 +219,7 @@ private: QStringList PromptFileNames(); + void OnConfigChanged(); void UpdateScreenSaverInhibition(); void OnStopComplete();