Move thread unpausing from destructor to shutdown

This commit is contained in:
Jeffrey Pfau 2014-10-25 17:32:11 -07:00
parent 10a907e387
commit b33e75daec
1 changed files with 3 additions and 3 deletions

View File

@ -92,9 +92,6 @@ GameController::GameController(QObject* parent)
GameController::~GameController() {
m_audioThread->quit();
m_audioThread->wait();
if (GBAThreadIsPaused(&m_threadContext)) {
GBAThreadUnpause(&m_threadContext);
}
disconnect();
closeGame();
delete m_renderer;
@ -189,6 +186,9 @@ void GameController::closeGame() {
if (!m_gameOpen) {
return;
}
if (GBAThreadIsPaused(&m_threadContext)) {
GBAThreadUnpause(&m_threadContext);
}
GBAThreadEnd(&m_threadContext);
GBAThreadJoin(&m_threadContext);
if (m_threadContext.fname) {