all repos — mgba @ 54b92bee16e9e61ad35ce4175688432e173b461d

mGBA Game Boy Advance Emulator

Qt: Fix Qt GL context sizing
Vicki Pfau vi@endrift.com
Sun, 06 Oct 2019 02:47:40 -0700
commit

54b92bee16e9e61ad35ce4175688432e173b461d

parent

ba3a8da2868913d1476393a21505ac97df3e61a8

2 files changed, 4 insertions(+), 1 deletions(-)

jump to
M src/platform/qt/DisplayGL.cppsrc/platform/qt/DisplayGL.cpp

@@ -350,6 +350,7 @@ }

void PainterGL::resize(const QSize& size) { m_size = size; + m_window->setSize(m_size); if (m_started && !m_active) { forceDraw(); }
M src/platform/qt/DisplayGL.hsrc/platform/qt/DisplayGL.h

@@ -29,6 +29,8 @@ #include "VideoProxy.h"

#include "platform/video-backend.h" +class QOpenGLPaintDevice; + namespace QGBA { class PainterGL;

@@ -119,7 +121,7 @@ QQueue<uint32_t*> m_queue;

QPainter m_painter; QMutex m_mutex; QWindow* m_surface; - QPaintDevice* m_window; + QOpenGLPaintDevice* m_window; QOpenGLContext* m_gl; bool m_active = false; bool m_started = false;