Qt: Fix shutdown leaks

This commit is contained in:
Vicki Pfau 2019-05-26 09:32:00 -07:00
parent f5fb96f256
commit 130cb63bbc
2 changed files with 8 additions and 5 deletions

View File

@ -197,6 +197,9 @@ CoreController::~CoreController() {
mCacheSetDeinit(m_cacheSet.get());
m_cacheSet.reset();
}
mCoreConfigDeinit(&m_threadContext.core->config);
m_threadContext.core->deinit(m_threadContext.core);
}
const color_t* CoreController::drawContext() {

View File

@ -780,11 +780,6 @@ void Window::gameStarted() {
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);
@ -819,6 +814,11 @@ void Window::gameStopped() {
m_audioProcessor->stop();
m_audioProcessor.reset();
}
m_display->stopDrawing();
if (m_pendingClose) {
m_display.reset();
close();
}
#ifdef USE_DISCORD_RPC
DiscordCoordinator::gameStopped();