From c5b6ccb9480cc83b173c7651698d655727b7ff55 Mon Sep 17 00:00:00 2001 From: "Joakim L. Gilje" Date: Sun, 5 Dec 2021 21:23:09 +0100 Subject: [PATCH] continued PR#12 into software renderer as well --- src/qt/qt_hardwarerenderer.cpp | 2 +- src/qt/qt_softwarerenderer.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qt/qt_hardwarerenderer.cpp b/src/qt/qt_hardwarerenderer.cpp index c18064d07..d9a206238 100644 --- a/src/qt/qt_hardwarerenderer.cpp +++ b/src/qt/qt_hardwarerenderer.cpp @@ -17,7 +17,7 @@ void HardwareRenderer::initializeGL() void HardwareRenderer::paintGL() { QPainter painter(this); - painter.setRenderHint(QPainter::SmoothPixmapTransform, video_filter_method); + painter.setRenderHint(QPainter::SmoothPixmapTransform, video_filter_method > 0 ? true : false); painter.drawImage(QRect(0, 0, width(), height()), image, QRect(sx, sy, sw, sh)); // "release" image, reducing it's refcount, so renderstack::blit() // won't have to reallocate diff --git a/src/qt/qt_softwarerenderer.cpp b/src/qt/qt_softwarerenderer.cpp index 9ecf6208f..cf69ca2fb 100644 --- a/src/qt/qt_softwarerenderer.cpp +++ b/src/qt/qt_softwarerenderer.cpp @@ -1,5 +1,8 @@ #include "qt_softwarerenderer.hpp" +extern "C" { +#include <86box/86box.h> +} #include SoftwareRenderer::SoftwareRenderer(QWidget *parent) : QWidget(parent) {} @@ -8,6 +11,7 @@ void SoftwareRenderer::paintEvent(QPaintEvent *event) { (void) event; QPainter painter(this); + painter.setRenderHint(QPainter::SmoothPixmapTransform, video_filter_method > 0 ? true : false); painter.drawImage(QRect(0, 0, width(), height()), image, QRect(sx, sy, sw, sh)); image = QImage(); }