summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorStenzek <stenzek@gmail.com>2020-03-11 23:13:42 +1000
committerStenzek <stenzek@gmail.com>2020-03-11 23:13:45 +1000
commitcdb0aa850da6fead21224eeed82df34e87e08fcc (patch)
tree92fb4573007ef87e27f5a7d7518e59f780fd9dec /Source
parent2f016295a615a74d3c3a4573642604d13c923a41 (diff)
Qt/RenderWidget: Remove fill background functionality
We no longer need this since the video backend handles clearing the window, and it fixes MoltenVK with Qt 5.14.
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/DolphinQt/RenderWidget.cpp18
-rw-r--r--Source/Core/DolphinQt/RenderWidget.h1
2 files changed, 2 insertions, 17 deletions
diff --git a/Source/Core/DolphinQt/RenderWidget.cpp b/Source/Core/DolphinQt/RenderWidget.cpp
index 3fbb24fb63..14cc33fae7 100644
--- a/Source/Core/DolphinQt/RenderWidget.cpp
+++ b/Source/Core/DolphinQt/RenderWidget.cpp
@@ -58,9 +58,6 @@ 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)
SetImGuiKeyMap();
});
@@ -91,21 +88,12 @@ RenderWidget::RenderWidget(QWidget* parent) : QWidget(parent)
// We need a native window to render into.
setAttribute(Qt::WA_NativeWindow);
-
- SetFillBackground(true);
-}
-
-void RenderWidget::SetFillBackground(bool fill)
-{
- setAutoFillBackground(fill);
- setAttribute(Qt::WA_OpaquePaintEvent, !fill);
- setAttribute(Qt::WA_NoSystemBackground, !fill);
- setAttribute(Qt::WA_PaintOnScreen, !fill);
+ setAttribute(Qt::WA_PaintOnScreen);
}
QPaintEngine* RenderWidget::paintEngine() const
{
- return autoFillBackground() ? QWidget::paintEngine() : nullptr;
+ return nullptr;
}
void RenderWidget::dragEnterEvent(QDragEnterEvent* event)
@@ -178,8 +166,6 @@ bool RenderWidget::event(QEvent* event)
switch (event->type())
{
- case QEvent::Paint:
- return !autoFillBackground();
case QEvent::KeyPress:
{
QKeyEvent* ke = static_cast<QKeyEvent*>(event);
diff --git a/Source/Core/DolphinQt/RenderWidget.h b/Source/Core/DolphinQt/RenderWidget.h
index 818e9209ab..650ba2d1dc 100644
--- a/Source/Core/DolphinQt/RenderWidget.h
+++ b/Source/Core/DolphinQt/RenderWidget.h
@@ -33,7 +33,6 @@ private:
void HandleCursorTimer();
void OnHideCursorChanged();
void OnKeepOnTopChanged(bool top);
- void SetFillBackground(bool fill);
void OnFreeLookMouseMove(QMouseEvent* event);
void PassEventToImGui(const QEvent* event);
void SetImGuiKeyMap();