-set down cover loader priority

-small code cleanup, removed unneeded things
This commit is contained in:
fix94.1 2012-06-01 06:43:37 +00:00
parent 2df40e782c
commit f006d37200
4 changed files with 37 additions and 44 deletions

View File

@ -638,7 +638,7 @@ void CCoverFlow::startCoverLoader(void)
m_moved = true; m_moved = true;
unsigned int stack_size = (unsigned int)8192; unsigned int stack_size = (unsigned int)8192;
LWP_CreateThread(&coverLoaderThread, (void *(*)(void *))CCoverFlow::_coverLoader, (void *)this, 0, stack_size, 40); LWP_CreateThread(&coverLoaderThread, (void *(*)(void *))CCoverFlow::_coverLoader, (void *)this, 0, stack_size, 20);
gprintf("Coverflow started!\n"); gprintf("Coverflow started!\n");
} }

View File

@ -1701,7 +1701,8 @@ void CMenu::_initCF(void)
void CMenu::_mainLoopCommon(bool withCF, bool blockReboot, bool adjusting) void CMenu::_mainLoopCommon(bool withCF, bool blockReboot, bool adjusting)
{ {
if (withCF) m_cf.tick(); if(withCF)
m_cf.tick();
m_btnMgr.tick(); m_btnMgr.tick();
m_fa.tick(); m_fa.tick();
m_cf.setFanartPlaying(m_fa.isLoaded()); m_cf.setFanartPlaying(m_fa.isLoaded());
@ -1711,7 +1712,9 @@ void CMenu::_mainLoopCommon(bool withCF, bool blockReboot, bool adjusting)
m_fa.hideCover() ? m_cf.hideCover() : m_cf.showCover(); m_fa.hideCover() ? m_cf.hideCover() : m_cf.showCover();
if (withCF) m_cf.makeEffectTexture(m_vid, m_lqBg); if(withCF)
m_cf.makeEffectTexture(m_vid, m_lqBg);
if(withCF && m_aa > 0) if(withCF && m_aa > 0)
{ {
m_vid.setAA(m_aa, true); m_vid.setAA(m_aa, true);
@ -1773,11 +1776,6 @@ void CMenu::_mainLoopCommon(bool withCF, bool blockReboot, bool adjusting)
else if(!m_gameSelected) else if(!m_gameSelected)
m_gameSound.Stop(); m_gameSound.Stop();
CheckThreads();
if (withCF && m_gameSoundThread == LWP_THREAD_NULL)
m_cf.startCoverLoader();
MusicPlayer::Instance()->Tick(m_video_playing || (m_gameSelected && MusicPlayer::Instance()->Tick(m_video_playing || (m_gameSelected &&
m_gameSound.IsLoaded()) || m_gameSound.IsPlaying()); m_gameSound.IsLoaded()) || m_gameSound.IsPlaying());
@ -1796,9 +1794,25 @@ void CMenu::_mainLoopCommon(bool withCF, bool blockReboot, bool adjusting)
if(!!m_cameraSound) if(!!m_cameraSound)
m_cameraSound->Play(255); m_cameraSound->Play(255);
} }
#ifdef SHOWMEM #ifdef SHOWMEM
m_btnMgr.setText(m_mem2FreeSize, wfmt(L"Mem2 Free:%u, Mem1 Free:%u", MEM2_freesize(), MEM1_freesize()), true); m_btnMgr.setText(m_mem2FreeSize, wfmt(L"Mem2 Free:%u, Mem1 Free:%u", MEM2_freesize(), MEM1_freesize()), true);
#endif #endif
#ifdef SHOWMEMGECKO
mem1 = MEM1_freesize();
mem2 = MEM2_freesize();
if(mem1 != mem1old)
{
mem1old = mem1;
gprintf("Mem1 Free: %u\n", mem1);
}
if(mem2 != mem2old)
{
mem2old = mem2;
gprintf("Mem2 Free: %u\n", mem2);
}
#endif
} }
void CMenu::_setBg(const STexture &tex, const STexture &lqTex) void CMenu::_setBg(const STexture &tex, const STexture &lqTex)

View File

@ -1095,7 +1095,6 @@ private:
void _playGameSound(void); void _playGameSound(void);
void CheckGameSoundThread(void); void CheckGameSoundThread(void);
void ClearGameSoundThreadStack(void); void ClearGameSoundThreadStack(void);
void CheckThreads(void);
static void _gameSoundThread(CMenu *m); static void _gameSoundThread(CMenu *m);
static void _load_installed_cioses(); static void _load_installed_cioses();

View File

@ -1540,23 +1540,3 @@ void CMenu::ClearGameSoundThreadStack()
if(gameSoundThreadStack.get()) if(gameSoundThreadStack.get())
gameSoundThreadStack.release(); gameSoundThreadStack.release();
} }
void CMenu::CheckThreads()
{
//CheckGameSoundThread(force);
//m_vid.CheckWaitThread(force);
#ifdef SHOWMEMGECKO
mem1 = SYS_GetArena1Size();
mem2 = MEM2_freesize();
if( mem1 != mem1old )
{
mem1old = mem1;
gprintf("Mem1 Free: %u\n", mem1);
}
if( mem2 != mem2old )
{
mem2old = mem2;
gprintf("Mem2 Free: %u\n", mem2);
}
#endif
}