Move thread unpausing from destructor to shutdown
Jeffrey Pfau jeffrey@endrift.com
Sat, 25 Oct 2014 17:32:11 -0700
1 files changed,
3 insertions(+),
3 deletions(-)
M
src/platform/qt/GameController.cpp
→
src/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);