PR #12 merged manually (Take video_filter_method into account when rendering, by @Cacodemon345)

This commit is contained in:
Joakim L. Gilje
2021-12-05 20:56:07 +01:00
parent b9714a0914
commit af512c98cc

View File

@@ -1,5 +1,9 @@
#include "qt_hardwarerenderer.hpp"
extern "C" {
#include <86box/86box.h>
}
void HardwareRenderer::resizeGL(int w, int h)
{
glViewport(0, 0, w, h);
@@ -13,6 +17,7 @@ void HardwareRenderer::initializeGL()
void HardwareRenderer::paintGL()
{
QPainter painter(this);
painter.setRenderHint(QPainter::SmoothPixmapTransform, video_filter_method);
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