diff --git a/src/duckstation-qt/mainwindow.cpp b/src/duckstation-qt/mainwindow.cpp index 5298dba50..5577e67d5 100644 --- a/src/duckstation-qt/mainwindow.cpp +++ b/src/duckstation-qt/mainwindow.cpp @@ -283,7 +283,7 @@ std::optional MainWindow::acquireRenderWindow(RenderAPI render_api, // Container can also be null if we're messing with settings while surfaceless. const bool has_container = (m_display_container != nullptr); const bool needs_container = DisplayContainer::isNeeded(fullscreen, render_to_main); - if (container && !is_rendering_to_main && !render_to_main && has_container == needs_container && !needs_container && + if (container && !is_rendering_to_main && !render_to_main && !has_container && !needs_container && !changing_surfaceless) { DEV_LOG("Toggling to {} without recreating surface", (fullscreen ? "fullscreen" : "windowed")); @@ -306,6 +306,7 @@ std::optional MainWindow::acquireRenderWindow(RenderAPI render_api, restoreDisplayWindowGeometryFromConfig(); } + updateDisplayRelatedActions(!surfaceless, fullscreen); updateDisplayWidgetCursor(); m_display_widget->setFocus(); updateWindowState(); @@ -410,7 +411,6 @@ void MainWindow::createDisplayWidget(bool fullscreen, bool render_to_main) updateDisplayRelatedActions(true, fullscreen); updateShortcutActions(false); - updateDisplayWidgetCursor(); // We need the surface visible. @@ -2189,8 +2189,9 @@ bool MainWindow::shouldHideMainWindow() const void MainWindow::switchToGameListView() { - // Normally, we'd never end up here. But on MacOS, the global menu is accessible while fullscreen. - exitFullscreen(true); + if (QtHost::CanRenderToMainWindow()) + // Normally, we'd never end up here. But on MacOS, the global menu is accessible while fullscreen. + exitFullscreen(true); if (!isShowingGameList()) { @@ -3040,8 +3041,7 @@ void MainWindow::onToolsCoverDownloaderTriggered() { // This can be invoked via big picture, so exit fullscreen. // Wait for the fullscreen request to actually go through, otherwise the downloader appears behind the main window. - if (isRenderingFullscreen()) - exitFullscreen(true); + exitFullscreen(true); if (!m_cover_download_window) {