Qt: Fix potential crash on Wayland with OpenGL (fixes #3276)

This commit is contained in:
Jan200101 2024-10-30 23:48:25 +01:00 committed by Vicki Pfau
parent 30897fee62
commit b51e58640f
2 changed files with 3 additions and 0 deletions

View File

@ -19,6 +19,7 @@ Other fixes:
- Qt: Fix crash when applying changes to GB I/O registers in I/O view
- Qt: Fix LCDC background priority/enable bit being mis-mapped in I/O view
- Qt: Fix saving named states breaking when screenshot states disabled (fixes mgba.io/i/3320)
- Qt: Fix potential crash on Wayland with OpenGL (fixes mgba.io/i/3276)
- Updater: Fix updating appimage across filesystems
Misc:
- Qt: Make window corners square on Windows 11 (fixes mgba.io/i/3285)

View File

@ -190,6 +190,8 @@ DisplayGL::DisplayGL(const QSurfaceFormat& format, QWidget* parent)
{
setAttribute(Qt::WA_NativeWindow);
window()->windowHandle()->setFormat(format);
windowHandle()->setSurfaceType(QSurface::OpenGLSurface);
windowHandle()->destroy();
windowHandle()->create();
#ifdef USE_SHARE_WIDGET