From 9388852e05abea3ec041ee96f814c8092ae0cd35 Mon Sep 17 00:00:00 2001 From: spycrab Date: Sun, 19 Nov 2017 17:27:07 +0100 Subject: [PATCH] Qt: Fix blackscreen --- Source/Core/DolphinQt2/RenderWidget.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinQt2/RenderWidget.cpp b/Source/Core/DolphinQt2/RenderWidget.cpp index df0d01b512..f8b744b3d4 100644 --- a/Source/Core/DolphinQt2/RenderWidget.cpp +++ b/Source/Core/DolphinQt2/RenderWidget.cpp @@ -15,8 +15,14 @@ RenderWidget::RenderWidget(QWidget* parent) : QWidget(parent) setAttribute(Qt::WA_NoSystemBackground, true); connect(Host::GetInstance(), &Host::RequestTitle, this, &RenderWidget::setWindowTitle); - connect(this, &RenderWidget::StateChanged, Host::GetInstance(), &Host::SetRenderFullscreen); - connect(this, &RenderWidget::HandleChanged, Host::GetInstance(), &Host::SetRenderHandle); + + // We have to use Qt::DirectConnection here because we don't want those signals to get queued + // (which results in them not getting called) + connect(this, &RenderWidget::StateChanged, Host::GetInstance(), &Host::SetRenderFullscreen, + Qt::DirectConnection); + connect(this, &RenderWidget::HandleChanged, Host::GetInstance(), &Host::SetRenderHandle, + Qt::DirectConnection); + emit HandleChanged((void*)winId()); m_mouse_timer = new QTimer(this);