diff --git a/source/list/list.cpp b/source/list/list.cpp index ba850c49..0315fd4e 100644 --- a/source/list/list.cpp +++ b/source/list/list.cpp @@ -139,25 +139,25 @@ void CList::GetHeaders(safe_vector pathlist, safe_vector 0 || ( gameTDB.IsLoaded() && gameTDB.GetTitle( (char *)tmp.hdr.id, GTitle ) ) ) { mbstowcs( tmp.title, GTitle.c_str(), sizeof(tmp.title) ); Asciify( tmp.title ); if(gc_disc[0]) wcslcat(tmp.title, L" disc 2", sizeof(tmp.title)); - + tmp.hdr.casecolor = ccolor != 1 ? ccolor : gameTDB.GetCaseColor( (char *)tmp.hdr.id ); if( tmp.hdr.casecolor == 0xffffffff ) tmp.hdr.casecolor = 0; - + tmp.hdr.gc_magic = 0xc2339f3d; (*itr)[(*itr).find_last_of('/')] = 0; (*itr).assign(&(*itr)[(*itr).find_last_of('/') + 1]); @@ -166,7 +166,7 @@ void CList::GetHeaders(safe_vector pathlist, safe_vector::GetHeaders(safe_vector pathlist, safe_vector::GetHeaders(safe_vector pathlist, safe_vector::GetHeaders(safe_vector pathlist, safe_vector::GetHeaders(safe_vector pathlist, safe_vectorhdr.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); diff --git a/source/menu/menu_game.cpp b/source/menu/menu_game.cpp index 471e6fa1..177cb319 100644 --- a/source/menu/menu_game.cpp +++ b/source/menu/menu_game.cpp @@ -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;