Wake up the drawing thread after loading a state to make sure it draws the loaded state

This commit is contained in:
Jeffrey Pfau 2014-10-15 23:40:40 -07:00
parent 6afc00b472
commit 961121808d
1 changed files with 1 additions and 0 deletions

View File

@ -207,6 +207,7 @@ void GameController::setFPSTarget(float fps) {
void GameController::loadState(int slot) {
GBAThreadInterrupt(&m_threadContext);
GBALoadState(m_threadContext.gba, m_threadContext.stateDir, slot);
ConditionWake(&m_threadContext.sync.videoFrameAvailableCond); // Hack: wake up the drawing thread
GBAThreadContinue(&m_threadContext);
emit stateLoaded(&m_threadContext);
emit frameAvailable(m_drawContext);