mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix Qt GL context sizing
This commit is contained in:
parent
ba3a8da286
commit
54b92bee16
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue