diff --git a/Source/Core/DolphinQt/RenderWidget.cpp b/Source/Core/DolphinQt/RenderWidget.cpp index 45427c1a60..1d2ffddc0f 100644 --- a/Source/Core/DolphinQt/RenderWidget.cpp +++ b/Source/Core/DolphinQt/RenderWidget.cpp @@ -52,6 +52,7 @@ RenderWidget::RenderWidget(QWidget* parent) : QWidget(parent) }); connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, [this](Core::State state) { + // Stop filling the background once emulation starts, but fill it until then (Bug 10958) SetFillBackground(Config::Get(Config::MAIN_RENDER_TO_MAIN) && state == Core::State::Uninitialized); if (state == Core::State::Running) @@ -90,9 +91,15 @@ RenderWidget::RenderWidget(QWidget* parent) : QWidget(parent) void RenderWidget::SetFillBackground(bool fill) { + setAutoFillBackground(fill); setAttribute(Qt::WA_OpaquePaintEvent, !fill); setAttribute(Qt::WA_NoSystemBackground, !fill); - setAutoFillBackground(fill); + setAttribute(Qt::WA_PaintOnScreen, !fill); +} + +QPaintEngine* RenderWidget::paintEngine() const +{ + return autoFillBackground() ? QWidget::paintEngine() : nullptr; } void RenderWidget::dragEnterEvent(QDragEnterEvent* event) diff --git a/Source/Core/DolphinQt/RenderWidget.h b/Source/Core/DolphinQt/RenderWidget.h index df4f34d93e..818e9209ab 100644 --- a/Source/Core/DolphinQt/RenderWidget.h +++ b/Source/Core/DolphinQt/RenderWidget.h @@ -19,6 +19,7 @@ public: bool event(QEvent* event) override; void showFullScreen(); + QPaintEngine* paintEngine() const override; signals: void EscapePressed();