Merge pull request #6864 from spycrab/qt_fix_fs_crash

Qt/Host: Fix random crashes when exiting fullscreen
This commit is contained in:
Anthony 2018-05-15 09:40:25 -07:00 committed by GitHub
commit 1d027c6049
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -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)