mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-12-25 19:31:58 +01:00
- some more fanart code cleanup
This commit is contained in:
parent
09e793655d
commit
0e58df8918
BIN
out/boot.dol
BIN
out/boot.dol
Binary file not shown.
Before Width: | Height: | Size: 3.3 MiB After Width: | Height: | Size: 3.3 MiB |
@ -58,8 +58,12 @@ bool CFanart::load(Config &m_wiiflowConfig, const char *path, const dir_discHdr
|
|||||||
strncpy(fanartDir, fmt("%s/%.3s", path, id), 163);
|
strncpy(fanartDir, fmt("%s/%.3s", path, id), 163);
|
||||||
texErr = TexHandle.fromImageFile(m_bg, fmt("%s/background.png", fanartDir));
|
texErr = TexHandle.fromImageFile(m_bg, fmt("%s/background.png", fanartDir));
|
||||||
}
|
}
|
||||||
if(texErr == TE_OK)
|
if(texErr == TE_ERROR)
|
||||||
{
|
{
|
||||||
|
TexHandle.Cleanup(m_bg);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
char faConfig_Path[164];
|
char faConfig_Path[164];
|
||||||
faConfig_Path[163] = '\0';
|
faConfig_Path[163] = '\0';
|
||||||
strncpy(faConfig_Path, fmt("%s/%s.ini", fanartDir, id), 163);
|
strncpy(faConfig_Path, fmt("%s/%s.ini", fanartDir, id), 163);
|
||||||
@ -68,12 +72,13 @@ bool CFanart::load(Config &m_wiiflowConfig, const char *path, const dir_discHdr
|
|||||||
{
|
{
|
||||||
strncpy(faConfig_Path, fmt("%s/%.3s.ini", fanartDir, id), 163);
|
strncpy(faConfig_Path, fmt("%s/%.3s.ini", fanartDir, id), 163);
|
||||||
m_faConfig.load(faConfig_Path);
|
m_faConfig.load(faConfig_Path);
|
||||||
|
}
|
||||||
if(!m_faConfig.loaded())
|
if(!m_faConfig.loaded())
|
||||||
{
|
{
|
||||||
TexHandle.Cleanup(m_bg);
|
TexHandle.Cleanup(m_bg);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
TexHandle.fromImageFile(m_bglq, fmt("%s/background_lq.png", fanartDir));
|
TexHandle.fromImageFile(m_bglq, fmt("%s/background_lq.png", fanartDir));
|
||||||
for(int i = 1; i <= 6; i++)
|
for(int i = 1; i <= 6; i++)
|
||||||
{
|
{
|
||||||
@ -84,7 +89,6 @@ bool CFanart::load(Config &m_wiiflowConfig, const char *path, const dir_discHdr
|
|||||||
m_defaultDelay = m_wiiflowConfig.getInt("FANART", "delay_after_animation", 200);
|
m_defaultDelay = m_wiiflowConfig.getInt("FANART", "delay_after_animation", 200);
|
||||||
m_delayAfterAnimation = m_faConfig.getInt("GENERAL", "delay_after_animation", m_defaultDelay);
|
m_delayAfterAnimation = m_faConfig.getInt("GENERAL", "delay_after_animation", m_defaultDelay);
|
||||||
m_globalShowCoverAfterAnimation = m_wiiflowConfig.getOptBool("FANART", "show_cover_after_animation", 2);
|
m_globalShowCoverAfterAnimation = m_wiiflowConfig.getOptBool("FANART", "show_cover_after_animation", 2);
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -317,7 +317,7 @@ void CMenu::_hideGame(bool instant)
|
|||||||
|
|
||||||
void CMenu::_showGame(void)
|
void CMenu::_showGame(void)
|
||||||
{
|
{
|
||||||
CoverFlow.showCover();
|
bool faPrevLoaded = m_fa.isLoaded();
|
||||||
|
|
||||||
const dir_discHdr *GameHdr = CoverFlow.getHdr();
|
const dir_discHdr *GameHdr = CoverFlow.getHdr();
|
||||||
const char *coverDir = NULL;
|
const char *coverDir = NULL;
|
||||||
@ -334,13 +334,15 @@ void CMenu::_showGame(void)
|
|||||||
const TexData *bg = NULL;
|
const TexData *bg = NULL;
|
||||||
const TexData *bglq = NULL;
|
const TexData *bglq = NULL;
|
||||||
m_fa.getBackground(bg, bglq);
|
m_fa.getBackground(bg, bglq);
|
||||||
if(bg != NULL && bglq != NULL)
|
|
||||||
_setBg(*bg, *bglq);
|
_setBg(*bg, *bglq);
|
||||||
CoverFlow.hideCover();
|
CoverFlow.hideCover();
|
||||||
}
|
}
|
||||||
else
|
else if(faPrevLoaded)
|
||||||
|
{
|
||||||
|
CoverFlow.showCover();
|
||||||
_setMainBg();
|
_setMainBg();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CMenu::_cleanupBanner(bool gamechange)
|
void CMenu::_cleanupBanner(bool gamechange)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user