-added DIOS-MIOS support (untested)

This commit is contained in:
fix94.1 2012-06-23 18:54:18 +00:00
parent bc2c810b04
commit d5c940c39b
3 changed files with 19 additions and 10 deletions

View File

@ -2400,25 +2400,34 @@ void CMenu::UpdateCache(u32 view)
m_cfg.setBool(domain, "update_cache", true);
}
bool CMenu::MIOSisDML()
int CMenu::MIOSisDML()
{
u32 size = 0;
u8 *appfile = ISFS_GetFile((u8*)"/title/00000001/00000101/content/0000000c.app", &size, 0);
if(appfile)
{
for(u32 i=0; i < size; ++i)
for(u32 i = 0; i < size; ++i)
{
if(*(u32*)(appfile+i) == 0x44494F53)
if(*(vu32*)(appfile+i) == 0x44494F53)
{
gprintf("DML is installed as MIOS\n");
for(u32 j = 0; j < size; ++j)
{
if(*(vu32*)(appfile+j) == 0x4C697465)
{
gprintf("DIOS-MIOS Lite is installed as MIOS\n");
MEM2_free(appfile);
return 2;
}
}
gprintf("DIOS-MIOS is installed as MIOS\n");
MEM2_free(appfile);
return true;
return 1;
}
}
MEM2_free(appfile);
}
gprintf("DML is not installed as MIOS\n");
return false;
gprintf("DIOS-MIOS (Lite) not found\n");
return 0;
}
void CMenu::RemoveCover( char * id )

View File

@ -180,7 +180,7 @@ private:
u32 m_mainBtnInit2;
u32 m_mainLblInit;
u32 m_mainLblUser[6];
bool m_show_dml;
u8 m_show_dml;
bool m_new_dml;
bool m_GameTDBLoaded;
//Main Config menus
@ -998,7 +998,7 @@ private:
const char *_domainFromView(void);
const char *_cfDomain(bool selected = false);
void UpdateCache(u32 view = COVERFLOW_MAX);
bool MIOSisDML();
int MIOSisDML();
void RemoveCover( char * id );
SFont _font(CMenu::FontSet &fontSet, const char *domain, const char *key, u32 fontSize, u32 lineSpacing, u32 weight, u32 index, const char *genKey);
STexture _texture(TexSet &texSet, const char *domain, const char *key, STexture def);

View File

@ -474,7 +474,7 @@ void CMenu::_game(bool launch)
{
_hideGame();
dir_discHdr *hdr = m_cf.getHdr();
if(currentPartition != SD && hdr->type == TYPE_GC_GAME)
if(currentPartition != SD && hdr->type == TYPE_GC_GAME && m_show_dml != 1)
{
bool foundOnSD = false;
CList<dir_discHdr> tmplist;