diff --git a/source/gui/video.cpp b/source/gui/video.cpp index 042bcad0..f52e55ae 100644 --- a/source/gui/video.cpp +++ b/source/gui/video.cpp @@ -519,7 +519,6 @@ void CVideo::_showWaitMessages(CVideo *m) m->m_waitMessages.clear(); //gprintf("Stop showing images\n"); m->m_showingWaitMessages = false; - m->CheckWaitThread(false); gprintf("Stop showing images\n"); } @@ -527,13 +526,14 @@ void CVideo::hideWaitMessage() { gprintf("Now hide wait message\n"); m_showWaitMessage = false; + CheckWaitThread(true); } void CVideo::CheckWaitThread(bool force) { - gprintf("Check wait thread start\n"); - if (force || !m_showingWaitMessages ) //&& waitThread != LWP_THREAD_NULL)) + if (force || !m_showingWaitMessages) //&& waitThread != LWP_THREAD_NULL)) { + gprintf("Check wait thread start\n"); if (waitThread != LWP_THREAD_NULL) { //m_showWaitMessage = false; @@ -549,8 +549,8 @@ void CVideo::CheckWaitThread(bool force) m_waitMessages.clear(); } + gprintf("Check wait thread end\n"); } - gprintf("Check wait thread end\n"); } void CVideo::waitMessage(float delay) @@ -593,6 +593,7 @@ void CVideo::waitMessage(const safe_vector &tex, float delay, bool use waitMessage(m_waitMessages[0]); else if (m_waitMessages.size() > 1) { + CheckWaitThread(true); m_showWaitMessage = true; unsigned int stack_size = (unsigned int)32768; //Try 32768? SMART_FREE(waitThreadStack); diff --git a/source/menu/menu_game.cpp b/source/menu/menu_game.cpp index f34fa733..0c9a4061 100644 --- a/source/menu/menu_game.cpp +++ b/source/menu/menu_game.cpp @@ -323,6 +323,7 @@ void CMenu::_game(bool launch) if (!launch) { SetupInput(); + m_cf.stopCoverLoader(); _playGameSound(); _showGame(); m_gameSelected = true; @@ -351,6 +352,7 @@ void CMenu::_game(bool launch) if (BTN_HOME_PRESSED || BTN_B_PRESSED) { + m_gameSound.Stop(); CheckGameSoundThread(); break; } @@ -527,7 +529,7 @@ void CMenu::_game(bool launch) m_gameSound.Stop(); m_gameSelected = false; m_fa.unload(); - _setBg(m_mainBg, m_mainBgLQ); + _setBg(m_mainBg, m_mainBgLQ); } if (m_show_zone_game) { @@ -661,6 +663,7 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool DML) m_gcfg1.save(true); m_cfg.save(true); + CheckGameSoundThread(); cleanup(); Close_Inputs(); USBStorage_Deinit(); @@ -1307,12 +1310,10 @@ void CMenu::_playGameSound(void) m_gamesound_changed = false; if (m_bnrSndVol == 0) return; - m_cf.stopCoverLoader(); - + CheckGameSoundThread(); unsigned int stack_size = (unsigned int)32768; SMART_FREE(gameSoundThreadStack); gameSoundThreadStack = smartMem2Alloc(stack_size); - CheckGameSoundThread(); LWP_CreateThread(&m_gameSoundThread, (void *(*)(void *))CMenu::_gameSoundThread, (void *)this, gameSoundThreadStack.get(), stack_size, 40); }