all repos — mgba @ 130cb63bbc45819d844dd7cf30015a533d4168d8

mGBA Game Boy Advance Emulator

Qt: Fix shutdown leaks
Vicki Pfau vi@endrift.com
Sun, 26 May 2019 09:32:00 -0700
commit

130cb63bbc45819d844dd7cf30015a533d4168d8

parent

f5fb96f256d6d2a1bc2a33228c0a83d43cc31ec6

2 files changed, 8 insertions(+), 5 deletions(-)

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

@@ -197,6 +197,9 @@ if (m_cacheSet) {

mCacheSetDeinit(m_cacheSet.get()); m_cacheSet.reset(); } + + mCoreConfigDeinit(&m_threadContext.core->config); + m_threadContext.core->deinit(m_threadContext.core); } const color_t* CoreController::drawContext() {
M src/platform/qt/Window.cppsrc/platform/qt/Window.cpp

@@ -780,11 +780,6 @@ }

void Window::gameStopped() { m_controller.reset(); - m_display->stopDrawing(); - if (m_pendingClose) { - m_display.reset(); - close(); - } #ifdef M_CORE_GBA for (Action* action : m_platformActions) { action->setEnabled(true);

@@ -818,6 +813,11 @@

if (m_audioProcessor) { m_audioProcessor->stop(); m_audioProcessor.reset(); + } + m_display->stopDrawing(); + if (m_pendingClose) { + m_display.reset(); + close(); } #ifdef USE_DISCORD_RPC