mirror of https://github.com/mgba-emu/mgba.git
Move thread unpausing from destructor to shutdown
This commit is contained in:
parent
10a907e387
commit
b33e75daec
|
@ -92,9 +92,6 @@ GameController::GameController(QObject* parent)
|
||||||
GameController::~GameController() {
|
GameController::~GameController() {
|
||||||
m_audioThread->quit();
|
m_audioThread->quit();
|
||||||
m_audioThread->wait();
|
m_audioThread->wait();
|
||||||
if (GBAThreadIsPaused(&m_threadContext)) {
|
|
||||||
GBAThreadUnpause(&m_threadContext);
|
|
||||||
}
|
|
||||||
disconnect();
|
disconnect();
|
||||||
closeGame();
|
closeGame();
|
||||||
delete m_renderer;
|
delete m_renderer;
|
||||||
|
@ -189,6 +186,9 @@ void GameController::closeGame() {
|
||||||
if (!m_gameOpen) {
|
if (!m_gameOpen) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (GBAThreadIsPaused(&m_threadContext)) {
|
||||||
|
GBAThreadUnpause(&m_threadContext);
|
||||||
|
}
|
||||||
GBAThreadEnd(&m_threadContext);
|
GBAThreadEnd(&m_threadContext);
|
||||||
GBAThreadJoin(&m_threadContext);
|
GBAThreadJoin(&m_threadContext);
|
||||||
if (m_threadContext.fname) {
|
if (m_threadContext.fname) {
|
||||||
|
|
Loading…
Reference in New Issue