mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2025-02-03 06:12:33 +01:00
-set down cover loader priority
-small code cleanup, removed unneeded things
This commit is contained in:
parent
2df40e782c
commit
f006d37200
@ -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");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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,11 +1712,13 @@ 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)
|
||||||
if (withCF && m_aa > 0)
|
m_cf.makeEffectTexture(m_vid, m_lqBg);
|
||||||
|
|
||||||
|
if(withCF && m_aa > 0)
|
||||||
{
|
{
|
||||||
m_vid.setAA(m_aa, true);
|
m_vid.setAA(m_aa, true);
|
||||||
for (int i = 0; i < m_aa; ++i)
|
for(int i = 0; i < m_aa; ++i)
|
||||||
{
|
{
|
||||||
m_vid.prepareAAPass(i);
|
m_vid.prepareAAPass(i);
|
||||||
m_vid.setup2DProjection(false, true);
|
m_vid.setup2DProjection(false, true);
|
||||||
@ -1736,7 +1739,7 @@ void CMenu::_mainLoopCommon(bool withCF, bool blockReboot, bool adjusting)
|
|||||||
m_vid.setup2DProjection();
|
m_vid.setup2DProjection();
|
||||||
_drawBg();
|
_drawBg();
|
||||||
m_fa.draw(false);
|
m_fa.draw(false);
|
||||||
if (withCF)
|
if(withCF)
|
||||||
{
|
{
|
||||||
m_cf.draw();
|
m_cf.draw();
|
||||||
m_vid.setup2DProjection();
|
m_vid.setup2DProjection();
|
||||||
@ -1752,11 +1755,11 @@ void CMenu::_mainLoopCommon(bool withCF, bool blockReboot, bool adjusting)
|
|||||||
|
|
||||||
m_vid.setup2DProjection();
|
m_vid.setup2DProjection();
|
||||||
m_vid.render();
|
m_vid.render();
|
||||||
if (!blockReboot)
|
if(!blockReboot)
|
||||||
{
|
{
|
||||||
if (withCF && Sys_Exiting())
|
if(withCF && Sys_Exiting())
|
||||||
m_cf.clear();
|
m_cf.clear();
|
||||||
if (Sys_Exiting())
|
if(Sys_Exiting())
|
||||||
{
|
{
|
||||||
m_cat.save();
|
m_cat.save();
|
||||||
m_cfg.save();
|
m_cfg.save();
|
||||||
@ -1764,7 +1767,7 @@ void CMenu::_mainLoopCommon(bool withCF, bool blockReboot, bool adjusting)
|
|||||||
Sys_Test();
|
Sys_Test();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (withCF && m_gameSelected && m_gamesound_changed && (m_gameSoundHdr == NULL) && !m_gameSound.IsPlaying() && MusicPlayer::Instance()->GetVolume() == 0)
|
if(withCF && m_gameSelected && m_gamesound_changed && (m_gameSoundHdr == NULL) && !m_gameSound.IsPlaying() && MusicPlayer::Instance()->GetVolume() == 0)
|
||||||
{
|
{
|
||||||
CheckGameSoundThread();
|
CheckGameSoundThread();
|
||||||
m_gameSound.Play(m_bnrSndVol);
|
m_gameSound.Play(m_bnrSndVol);
|
||||||
@ -1773,19 +1776,14 @@ 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());
|
||||||
|
|
||||||
//Take Screenshot
|
//Take Screenshot
|
||||||
if (gc_btnsPressed & PAD_TRIGGER_Z)
|
if(gc_btnsPressed & PAD_TRIGGER_Z)
|
||||||
{
|
{
|
||||||
time_t rawtime;
|
time_t rawtime;
|
||||||
struct tm * timeinfo;
|
struct tm *timeinfo;
|
||||||
char buffer[80];
|
char buffer[80];
|
||||||
|
|
||||||
time(&rawtime);
|
time(&rawtime);
|
||||||
@ -1793,12 +1791,28 @@ void CMenu::_mainLoopCommon(bool withCF, bool blockReboot, bool adjusting)
|
|||||||
strftime(buffer,80,"%b-%d-20%y-%Hh%Mm%Ss.png",timeinfo);
|
strftime(buffer,80,"%b-%d-20%y-%Hh%Mm%Ss.png",timeinfo);
|
||||||
gprintf("Screenshot taken and saved to: %s/%s\n", m_screenshotDir.c_str(), buffer);
|
gprintf("Screenshot taken and saved to: %s/%s\n", m_screenshotDir.c_str(), buffer);
|
||||||
m_vid.TakeScreenshot(fmt("%s/%s", m_screenshotDir.c_str(), buffer));
|
m_vid.TakeScreenshot(fmt("%s/%s", m_screenshotDir.c_str(), buffer));
|
||||||
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)
|
||||||
|
@ -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();
|
||||||
|
@ -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
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user