all repos — mgba @ 3aae19a8073a60587a908e1029a253cc42b7b9d3

mGBA Game Boy Advance Emulator

Qt: Windows fixes
Vicki Pfau vi@endrift.com
Tue, 21 May 2019 17:17:24 -0700
commit

3aae19a8073a60587a908e1029a253cc42b7b9d3

parent

18f27d5ee6d4d1d74a9a9826c34aab6cbe8219dc

1 files changed, 5 insertions(+), 0 deletions(-)

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

@@ -35,6 +35,7 @@ : Display(parent)

, m_gl(nullptr) { setAttribute(Qt::WA_NativeWindow); + windowHandle()->create(); // This can spontaneously re-enter into this->resizeEvent before creation is done, so we // need to make sure it's initialized to nullptr before we assign the new object to it

@@ -263,6 +264,10 @@ PainterGL* painter = static_cast<PainterGL*>(v->user);

if (!painter->m_gl->isValid()) { return; } + painter->m_gl->makeCurrent(painter->m_surface); +#if defined(_WIN32) && defined(USE_EPOXY) + epoxy_handle_external_wglMakeCurrent(); +#endif painter->m_gl->swapBuffers(painter->m_gl->surface()); };