all repos — mgba @ e217a1fefb8b87de47a62422f42dfc6009591d2c

mGBA Game Boy Advance Emulator

Qt: Fix crash unloading shaders
Vicki Pfau vi@endrift.com
Mon, 27 Jan 2020 23:00:49 -0800
commit

e217a1fefb8b87de47a62422f42dfc6009591d2c

parent

32827edebf82dd340de59516ac94b2f5a303dd6a

2 files changed, 10 insertions(+), 0 deletions(-)

jump to
M CHANGESCHANGES

@@ -17,6 +17,7 @@ - Qt: Fix race condition with proxied video events

- Qt: Force OpenGL paint engine creation thread (fixes mgba.io/i/1642) - Qt: Fix color selection in asset view (fixes mgba.io/i/1648) - Qt: Fix missing OSD messages + - Qt: Fix crash unloading shaders 0.8.0: (2020-01-21) Features:
M src/platform/qt/DisplayGL.cppsrc/platform/qt/DisplayGL.cpp

@@ -575,9 +575,18 @@ if (!supportsShaders()) {

return; } #ifdef BUILD_GLES2 + if (!m_started) { + m_gl->makeCurrent(m_surface); +#if defined(_WIN32) && defined(USE_EPOXY) + epoxy_handle_external_wglMakeCurrent(); +#endif + } if (m_shader.passes) { mGLES2ShaderDetach(reinterpret_cast<mGLES2Context*>(m_backend)); mGLES2ShaderFree(&m_shader); + } + if (!m_started) { + m_gl->doneCurrent(); } #endif }