mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-23 19:59:16 +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();
|
m->m_waitMessages.clear();
|
||||||
//gprintf("Stop showing images\n");
|
//gprintf("Stop showing images\n");
|
||||||
m->m_showingWaitMessages = false;
|
m->m_showingWaitMessages = false;
|
||||||
m->CheckWaitThread(false);
|
|
||||||
gprintf("Stop showing images\n");
|
gprintf("Stop showing images\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -527,13 +526,14 @@ void CVideo::hideWaitMessage()
|
|||||||
{
|
{
|
||||||
gprintf("Now hide wait message\n");
|
gprintf("Now hide wait message\n");
|
||||||
m_showWaitMessage = false;
|
m_showWaitMessage = false;
|
||||||
|
CheckWaitThread(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CVideo::CheckWaitThread(bool force)
|
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)
|
if (waitThread != LWP_THREAD_NULL)
|
||||||
{
|
{
|
||||||
//m_showWaitMessage = false;
|
//m_showWaitMessage = false;
|
||||||
@ -549,8 +549,8 @@ void CVideo::CheckWaitThread(bool force)
|
|||||||
|
|
||||||
m_waitMessages.clear();
|
m_waitMessages.clear();
|
||||||
}
|
}
|
||||||
|
gprintf("Check wait thread end\n");
|
||||||
}
|
}
|
||||||
gprintf("Check wait thread end\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CVideo::waitMessage(float delay)
|
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]);
|
waitMessage(m_waitMessages[0]);
|
||||||
else if (m_waitMessages.size() > 1)
|
else if (m_waitMessages.size() > 1)
|
||||||
{
|
{
|
||||||
|
CheckWaitThread(true);
|
||||||
m_showWaitMessage = true;
|
m_showWaitMessage = true;
|
||||||
unsigned int stack_size = (unsigned int)32768; //Try 32768?
|
unsigned int stack_size = (unsigned int)32768; //Try 32768?
|
||||||
SMART_FREE(waitThreadStack);
|
SMART_FREE(waitThreadStack);
|
||||||
|
@ -323,6 +323,7 @@ void CMenu::_game(bool launch)
|
|||||||
if (!launch)
|
if (!launch)
|
||||||
{
|
{
|
||||||
SetupInput();
|
SetupInput();
|
||||||
|
m_cf.stopCoverLoader();
|
||||||
_playGameSound();
|
_playGameSound();
|
||||||
_showGame();
|
_showGame();
|
||||||
m_gameSelected = true;
|
m_gameSelected = true;
|
||||||
@ -351,6 +352,7 @@ void CMenu::_game(bool launch)
|
|||||||
|
|
||||||
if (BTN_HOME_PRESSED || BTN_B_PRESSED)
|
if (BTN_HOME_PRESSED || BTN_B_PRESSED)
|
||||||
{
|
{
|
||||||
|
m_gameSound.Stop();
|
||||||
CheckGameSoundThread();
|
CheckGameSoundThread();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -527,7 +529,7 @@ void CMenu::_game(bool launch)
|
|||||||
m_gameSound.Stop();
|
m_gameSound.Stop();
|
||||||
m_gameSelected = false;
|
m_gameSelected = false;
|
||||||
m_fa.unload();
|
m_fa.unload();
|
||||||
_setBg(m_mainBg, m_mainBgLQ);
|
_setBg(m_mainBg, m_mainBgLQ);
|
||||||
}
|
}
|
||||||
if (m_show_zone_game)
|
if (m_show_zone_game)
|
||||||
{
|
{
|
||||||
@ -661,6 +663,7 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool DML)
|
|||||||
m_gcfg1.save(true);
|
m_gcfg1.save(true);
|
||||||
m_cfg.save(true);
|
m_cfg.save(true);
|
||||||
|
|
||||||
|
CheckGameSoundThread();
|
||||||
cleanup();
|
cleanup();
|
||||||
Close_Inputs();
|
Close_Inputs();
|
||||||
USBStorage_Deinit();
|
USBStorage_Deinit();
|
||||||
@ -1307,12 +1310,10 @@ void CMenu::_playGameSound(void)
|
|||||||
m_gamesound_changed = false;
|
m_gamesound_changed = false;
|
||||||
if (m_bnrSndVol == 0) return;
|
if (m_bnrSndVol == 0) return;
|
||||||
|
|
||||||
m_cf.stopCoverLoader();
|
CheckGameSoundThread();
|
||||||
|
|
||||||
unsigned int stack_size = (unsigned int)32768;
|
unsigned int stack_size = (unsigned int)32768;
|
||||||
SMART_FREE(gameSoundThreadStack);
|
SMART_FREE(gameSoundThreadStack);
|
||||||
gameSoundThreadStack = smartMem2Alloc(stack_size);
|
gameSoundThreadStack = smartMem2Alloc(stack_size);
|
||||||
CheckGameSoundThread();
|
|
||||||
LWP_CreateThread(&m_gameSoundThread, (void *(*)(void *))CMenu::_gameSoundThread, (void *)this, gameSoundThreadStack.get(), stack_size, 40);
|
LWP_CreateThread(&m_gameSoundThread, (void *(*)(void *))CMenu::_gameSoundThread, (void *)this, gameSoundThreadStack.get(), stack_size, 40);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user