mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-12-24 02:41:55 +01:00
-changed a few things about wait message and
game sound thread checks, hopefully fixes a few random freezes or not stopping loading
This commit is contained in:
parent
1fb7628da7
commit
2247728e6a
@ -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<STexture> &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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user