-made the plugin coverflow id stuff as needed for categories etc

This commit is contained in:
fix94.1 2012-12-28 17:18:49 +00:00
parent 1a2f1aa028
commit ff08312b3a

View File

@ -219,8 +219,8 @@ void CMenu::init()
/* Check if we want a cIOS loaded */ /* Check if we want a cIOS loaded */
u8 prevCios = mainIOS; u8 prevCios = mainIOS;
bool prevForceCIOS = useMainIOS; bool prevForceCIOS = useMainIOS;
int ForceIOS = min(m_cfg.getInt("GENERAL", "force_cios_rev", 0), 254); u8 ForceIOS = min(m_cfg.getInt("GENERAL", "force_cios_rev", 0), 254);
if(ForceIOS > 0) if(mainIOS != ForceIOS)
{ {
gprintf("Using IOS%i instead of IOS%i as main cIOS.\n", ForceIOS, mainIOS); gprintf("Using IOS%i instead of IOS%i as main cIOS.\n", ForceIOS, mainIOS);
mainIOS = ForceIOS; mainIOS = ForceIOS;
@ -2570,12 +2570,24 @@ void CMenu::_cleanupDefaultFont()
m_wbf2_font = NULL; m_wbf2_font = NULL;
} }
char tmp[256];
const char *CMenu::_getId() const char *CMenu::_getId()
{ {
const char *id = NULL; const char *id = NULL;
dir_discHdr *hdr = CoverFlow.getHdr(); dir_discHdr *hdr = CoverFlow.getHdr();
if(hdr->type == TYPE_HOMEBREW || hdr->type == TYPE_PLUGIN) if(hdr->type == TYPE_HOMEBREW)
id = strrchr(hdr->path, '/') + 1; id = strrchr(hdr->path, '/') + 1;
else if(hdr->type == TYPE_PLUGIN)
{
tmp[0] = '\0';
if(strrchr(hdr->path, ':') != NULL)
{
strcat(tmp, strchr(hdr->path, '/') + 1);
*(strchr(tmp, '/') + 1) = '\0';
}
strcat(tmp, fmt("%ls",hdr->title));
id = tmp;
}
else else
id = CoverFlow.getId(); id = CoverFlow.getId();
return id; return id;