-if a gamecube game is found in the wbfs folder,

it will be displayed in regular wii coverflow and
it's also possible to launch it as in dml coverflow
This commit is contained in:
fix94.1 2012-03-10 22:07:06 +00:00
parent b256cd9214
commit 592e22951f
3 changed files with 26 additions and 21 deletions

View File

@ -116,7 +116,7 @@ void CMenu::_showGameSettings(void)
m_btnMgr.show(m_gameSettingsBtnPageP);
m_btnMgr.show(m_gameSettingsBtnBack);
m_btnMgr.show(m_gameSettingsLblTitle);
if(m_current_view != COVERFLOW_DML)
if(m_cf.getHdr()->hdr.gc_magic != 0xc2339f3d)
g_numGCfPages = 4;
else
g_numGCfPages = 2;
@ -126,7 +126,7 @@ void CMenu::_showGameSettings(void)
m_btnMgr.show(m_gameSettingsLblCover);
m_btnMgr.show(m_gameSettingsBtnCover);
if(m_current_view != COVERFLOW_DML)
if(m_cf.getHdr()->hdr.gc_magic != 0xc2339f3d)
{
m_btnMgr.show(m_gameSettingsBtnCategoryMain);
m_btnMgr.show(m_gameSettingsLblCategoryMain);
@ -159,7 +159,7 @@ void CMenu::_showGameSettings(void)
m_btnMgr.hide(m_gameSettingsLblCover);
m_btnMgr.hide(m_gameSettingsBtnCover);
if(m_current_view != COVERFLOW_DML)
if(m_cf.getHdr()->hdr.gc_magic != 0xc2339f3d)
{
m_btnMgr.hide(m_gameSettingsBtnCategoryMain);
m_btnMgr.hide(m_gameSettingsLblCategoryMain);
@ -194,7 +194,7 @@ void CMenu::_showGameSettings(void)
m_btnMgr.show(m_gameSettingsBtnDebuggerP);
m_btnMgr.show(m_gameSettingsBtnDebuggerM);
if(m_current_view != COVERFLOW_DML)
if(m_cf.getHdr()->hdr.gc_magic != 0xc2339f3d)
{
m_btnMgr.show(m_gameSettingsLblHooktype);
m_btnMgr.show(m_gameSettingsLblHooktypeVal);
@ -215,7 +215,7 @@ void CMenu::_showGameSettings(void)
m_btnMgr.hide(m_gameSettingsBtnDebuggerP);
m_btnMgr.hide(m_gameSettingsBtnDebuggerM);
if(m_current_view != COVERFLOW_DML)
if(m_cf.getHdr()->hdr.gc_magic != 0xc2339f3d)
{
m_btnMgr.hide(m_gameSettingsLblHooktype);
m_btnMgr.hide(m_gameSettingsLblHooktypeVal);

View File

@ -445,7 +445,7 @@ void CMenu::_game(bool launch)
{
_hideGame();
dir_discHdr *hdr = m_cf.getHdr();
if(currentPartition != SD && m_current_view == COVERFLOW_DML)
if(currentPartition != SD && hdr->hdr.gc_magic == 0xc2339f3d)
{
char gcfolder[300];
sprintf(gcfolder, "%s [%s]", m_cf.getTitle().toUTF8().c_str(), (char *)hdr->hdr.id);
@ -470,7 +470,7 @@ void CMenu::_game(bool launch)
if (m_current_view != COVERFLOW_HOMEBREW)
{
// Get banner_title
Banner * banner = m_current_view == COVERFLOW_CHANNEL ? _extractChannelBnr(chantitle) : m_current_view == COVERFLOW_USB ? _extractBnr(hdr) : NULL;
Banner * banner = m_current_view == COVERFLOW_CHANNEL ? _extractChannelBnr(chantitle) : (m_current_view == COVERFLOW_USB && hdr->hdr.gc_magic != 0xc2339f3d) ? _extractBnr(hdr) : NULL;
if (banner != NULL)
{
if (banner->IsValid())
@ -550,7 +550,7 @@ void CMenu::_game(bool launch)
m_btnMgr.show(m_gameBtnSettings);
}
if ((m_current_view == COVERFLOW_USB || m_current_view == COVERFLOW_DML) && !m_locked)
if ((m_current_view == COVERFLOW_USB || m_cf.getHdr()->hdr.gc_magic == 0xc2339f3d) && !m_locked)
m_btnMgr.show(m_gameBtnDelete);
}
else
@ -602,6 +602,11 @@ void CMenu::_directlaunch(const string &id)
void CMenu::_launch(dir_discHdr *hdr)
{
m_gcfg2.load(sfmt("%s/gameconfig2.ini", m_settingsDir.c_str()).c_str());
if(hdr->hdr.gc_magic == 0xc2339f3d)
{
_launchGC(hdr, true);
return;
}
switch(m_current_view)
{
case COVERFLOW_HOMEBREW:
@ -1321,7 +1326,7 @@ SmartBuf gameSoundThreadStack;
void CMenu::_gameSoundThread(CMenu *m)
{
if(m->m_current_view == COVERFLOW_DML)
if(m->m_cf.getHdr()->hdr.gc_magic == 0xc2339f3d)
{
m->m_gameSound.Load(gc_ogg, gc_ogg_size, false);
m->m_gamesound_changed = true;