Qt: Fix Qt GL context sizing

This commit is contained in:
Vicki Pfau 2019-10-06 02:47:40 -07:00
parent ba3a8da286
commit 54b92bee16
2 changed files with 4 additions and 1 deletions

View File

@ -350,6 +350,7 @@ void PainterGL::setMessagePainter(MessagePainter* messagePainter) {
void PainterGL::resize(const QSize& size) {
m_size = size;
m_window->setSize(m_size);
if (m_started && !m_active) {
forceDraw();
}

View File

@ -29,6 +29,8 @@
#include "platform/video-backend.h"
class QOpenGLPaintDevice;
namespace QGBA {
class PainterGL;
@ -119,7 +121,7 @@ private:
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;