From b9bd4ecbcb83041c3573d294f9134571083af607 Mon Sep 17 00:00:00 2001 From: spycrab Date: Tue, 15 May 2018 18:22:26 +0200 Subject: [PATCH] Qt/Host: Fix random crashes when exiting fullscreen --- Source/Core/DolphinQt2/Host.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Core/DolphinQt2/Host.cpp b/Source/Core/DolphinQt2/Host.cpp index 83b8010539..458f374099 100644 --- a/Source/Core/DolphinQt2/Host.cpp +++ b/Source/Core/DolphinQt2/Host.cpp @@ -46,7 +46,10 @@ void Host::SetRenderFocus(bool focus) { m_render_focus = focus; if (g_renderer && m_render_fullscreen && g_ActiveConfig.ExclusiveFullscreenEnabled()) - Core::RunAsCPUThread([focus] { g_renderer->SetFullscreen(focus); }); + Core::RunAsCPUThread([focus] { + if (!SConfig::GetInstance().bRenderToMain) + g_renderer->SetFullscreen(focus); + }); } bool Host::GetRenderFullscreen() @@ -110,10 +113,7 @@ void Host_YieldToUI() void Host_UpdateDisasmDialog() { - RunOnObject(QApplication::instance(), [&] { - emit Host::GetInstance()->UpdateDisasmDialog(); - return true; - }); + QueueOnObject(Host::GetInstance(), [] { emit Host::GetInstance()->UpdateDisasmDialog(); }); } void Host_UpdateProgressDialog(const char* caption, int position, int total)