qt/MainWindow: for disable hide window if render to main is enabled

This fixes a crash on wayland (and possibly others)
This commit is contained in:
GovanifY 2024-07-19 12:26:16 +02:00 committed by Ty
parent 7a3d22ecdf
commit 17567b960f
1 changed files with 1 additions and 1 deletions

View File

@ -1053,7 +1053,7 @@ bool MainWindow::shouldHideMouseCursor() const
bool MainWindow::shouldHideMainWindow() const
{
// NOTE: We can't use isRenderingToMain() here, because this happens post-fullscreen-switch.
return Host::GetBoolSettingValue("UI", "HideMainWindowWhenRunning", false) ||
return (Host::GetBoolSettingValue("UI", "HideMainWindowWhenRunning", false) && !g_emu_thread->shouldRenderToMain()) ||
(g_emu_thread->shouldRenderToMain() && (isRenderingFullscreen() || m_is_temporarily_windowed)) ||
QtHost::InNoGUIMode();
}