all repos — mgba @ cadceecdab62c255cbd321afd48cec91fc340668

mGBA Game Boy Advance Emulator

Qt: Fix loading a new game crashing on Wayland (fixes #1992)
Vicki Pfau vi@endrift.com
Sun, 20 Dec 2020 21:00:17 -0800
commit

cadceecdab62c255cbd321afd48cec91fc340668

parent

ff6218fe1ed50cf90f3a9489da902e00ad743e0c

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

jump to
M CHANGESCHANGES

@@ -82,6 +82,7 @@ - Qt: Pre-attach GDB stub when launching with -g (fixes mgba.io/i/1950)

- Qt: Fix crash when editing shortcuts with none selected (fixes mgba.io/i/1964) - Qt: Fix crashing when no OpenGL context can be obtained - Qt: Fix issues with I/O viewer not properly synchronizing state + - Qt: Fix loading a new game crashing on Wayland (fixes mgba.io/i/1992) - SM83: Simplify register pair access on big endian - SM83: Disassemble STOP as one byte - Wii: Fix crash on unloading irregularly sized GBA ROMs
M src/platform/qt/Window.cppsrc/platform/qt/Window.cpp

@@ -808,15 +808,6 @@ for (Action* action : m_gameActions) {

action->setEnabled(false); } setWindowFilePath(QString()); - detachWidget(m_display.get()); - setLogo(); - if (m_display) { -#ifdef M_CORE_GB - m_display->setMinimumSize(GB_VIDEO_HORIZONTAL_PIXELS, GB_VIDEO_VERTICAL_PIXELS); -#elif defined(M_CORE_GBA) - m_display->setMinimumSize(GBA_VIDEO_HORIZONTAL_PIXELS, GBA_VIDEO_VERTICAL_PIXELS); -#endif - } m_actions.clearMenu("videoLayers"); m_actions.clearMenu("audioChannels");

@@ -829,6 +820,15 @@ m_audioProcessor->stop();

m_audioProcessor.reset(); } m_display->stopDrawing(); + detachWidget(m_display.get()); + setLogo(); + if (m_display) { +#ifdef M_CORE_GB + m_display->setMinimumSize(GB_VIDEO_HORIZONTAL_PIXELS, GB_VIDEO_VERTICAL_PIXELS); +#elif defined(M_CORE_GBA) + m_display->setMinimumSize(GBA_VIDEO_HORIZONTAL_PIXELS, GBA_VIDEO_VERTICAL_PIXELS); +#endif + } m_controller.reset(); updateTitle();