mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix shutdown leaks
This commit is contained in:
parent
f5fb96f256
commit
130cb63bbc
|
@ -197,6 +197,9 @@ CoreController::~CoreController() {
|
||||||
mCacheSetDeinit(m_cacheSet.get());
|
mCacheSetDeinit(m_cacheSet.get());
|
||||||
m_cacheSet.reset();
|
m_cacheSet.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mCoreConfigDeinit(&m_threadContext.core->config);
|
||||||
|
m_threadContext.core->deinit(m_threadContext.core);
|
||||||
}
|
}
|
||||||
|
|
||||||
const color_t* CoreController::drawContext() {
|
const color_t* CoreController::drawContext() {
|
||||||
|
|
|
@ -780,11 +780,6 @@ void Window::gameStarted() {
|
||||||
|
|
||||||
void Window::gameStopped() {
|
void Window::gameStopped() {
|
||||||
m_controller.reset();
|
m_controller.reset();
|
||||||
m_display->stopDrawing();
|
|
||||||
if (m_pendingClose) {
|
|
||||||
m_display.reset();
|
|
||||||
close();
|
|
||||||
}
|
|
||||||
#ifdef M_CORE_GBA
|
#ifdef M_CORE_GBA
|
||||||
for (Action* action : m_platformActions) {
|
for (Action* action : m_platformActions) {
|
||||||
action->setEnabled(true);
|
action->setEnabled(true);
|
||||||
|
@ -819,6 +814,11 @@ void Window::gameStopped() {
|
||||||
m_audioProcessor->stop();
|
m_audioProcessor->stop();
|
||||||
m_audioProcessor.reset();
|
m_audioProcessor.reset();
|
||||||
}
|
}
|
||||||
|
m_display->stopDrawing();
|
||||||
|
if (m_pendingClose) {
|
||||||
|
m_display.reset();
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef USE_DISCORD_RPC
|
#ifdef USE_DISCORD_RPC
|
||||||
DiscordCoordinator::gameStopped();
|
DiscordCoordinator::gameStopped();
|
||||||
|
|
Loading…
Reference in New Issue