all repos — mgba @ b33e75daec0727bfa9a7b97aab7b50723d53eaa4

mGBA Game Boy Advance Emulator

Move thread unpausing from destructor to shutdown
Jeffrey Pfau jeffrey@endrift.com
Sat, 25 Oct 2014 17:32:11 -0700
commit

b33e75daec0727bfa9a7b97aab7b50723d53eaa4

parent

10a907e3873f9cddca0bc2e0524fcd020e672093

1 files changed, 3 insertions(+), 3 deletions(-)

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

@@ -92,9 +92,6 @@

GameController::~GameController() { m_audioThread->quit(); m_audioThread->wait(); - if (GBAThreadIsPaused(&m_threadContext)) { - GBAThreadUnpause(&m_threadContext); - } disconnect(); closeGame(); delete m_renderer;

@@ -188,6 +185,9 @@

void GameController::closeGame() { if (!m_gameOpen) { return; + } + if (GBAThreadIsPaused(&m_threadContext)) { + GBAThreadUnpause(&m_threadContext); } GBAThreadEnd(&m_threadContext); GBAThreadJoin(&m_threadContext);