mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2025-01-23 09:11:11 +01:00
-fixed bin and iso files not displayed in emulator coverflow
-removed hide settings button if no game found to reload cache
This commit is contained in:
parent
13183666d9
commit
1bd07dc6dc
@ -151,7 +151,45 @@ void CList<dir_discHdr>::GetHeaders(vector<string> pathlist, vector<dir_discHdr>
|
||||
tmp.hdr.casecolor = 1;
|
||||
|
||||
bool wbfs = (*itr).rfind(".wbfs") != string::npos || (*itr).rfind(".WBFS") != string::npos;
|
||||
if (wbfs || (*itr).rfind(".iso") != string::npos || (*itr).rfind(".ISO") != string::npos
|
||||
|
||||
if(plugin.loaded())
|
||||
{
|
||||
vector<string> types = plugin.getStrings("PLUGIN","fileTypes",'|');
|
||||
if (types.size() > 0)
|
||||
{
|
||||
for(vector<string>::iterator type_itr = types.begin(); type_itr != types.end(); type_itr++)
|
||||
{
|
||||
if(lowerCase(*itr).rfind((*type_itr).c_str()) != string::npos)
|
||||
{
|
||||
strncpy(tmp.path, (*itr).c_str(), sizeof(tmp.path));
|
||||
|
||||
int plugin_ccolor;
|
||||
sscanf(plugin.getString("PLUGIN","coverColor","").c_str(), "%08x", &plugin_ccolor);
|
||||
int ccolor = custom_titles.getColor("COVERS", (const char *) tmp.hdr.id, plugin_ccolor).intVal();
|
||||
tmp.hdr.casecolor = ccolor != plugin_ccolor ? ccolor : plugin_ccolor;
|
||||
|
||||
char tempname[64];
|
||||
(*itr).assign(&(*itr)[(*itr).find_last_of('/') + 1]);
|
||||
if((*itr).find_last_of('.') != string::npos)
|
||||
(*itr).erase((*itr).find_last_of('.'), (*itr).size() - (*itr).find_last_of('.'));
|
||||
strncpy(tempname, (*itr).c_str(), sizeof(tempname));
|
||||
//mbstowcs(tmp.title, tempname, sizeof(tmp.title));
|
||||
//Asciify(tmp.title);
|
||||
wstringEx tmpString;
|
||||
tmpString.fromUTF8(tempname);
|
||||
wcsncpy(tmp.title, tmpString.c_str(), 64);
|
||||
|
||||
gprintf("Found: %s\n", tmp.path);
|
||||
sscanf(plugin.getString("PLUGIN","magic","").c_str(), "%08x", &tmp.hdr.magic); //Plugin magic
|
||||
tmp.hdr.gc_magic = EMU_MAGIC; //Abusing gc_magic for general emu detection ;)
|
||||
headerlist.push_back(tmp);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
else if (wbfs || (*itr).rfind(".iso") != string::npos || (*itr).rfind(".ISO") != string::npos
|
||||
|| (*itr).rfind(".bin") != string::npos || (*itr).rfind(".BIN") != string::npos)
|
||||
{
|
||||
char* filename = &(*itr)[(*itr).find_last_of('/')+1];
|
||||
@ -418,43 +456,6 @@ void CList<dir_discHdr>::GetHeaders(vector<string> pathlist, vector<dir_discHdr>
|
||||
}
|
||||
continue;
|
||||
}
|
||||
else if(plugin.loaded())
|
||||
{
|
||||
vector<string> types = plugin.getStrings("PLUGIN","fileTypes",'|');
|
||||
if (types.size() > 0)
|
||||
{
|
||||
for(vector<string>::iterator type_itr = types.begin(); type_itr != types.end(); type_itr++)
|
||||
{
|
||||
if(lowerCase(*itr).rfind((*type_itr).c_str()) != string::npos)
|
||||
{
|
||||
strncpy(tmp.path, (*itr).c_str(), sizeof(tmp.path));
|
||||
|
||||
int plugin_ccolor;
|
||||
sscanf(plugin.getString("PLUGIN","coverColor","").c_str(), "%08x", &plugin_ccolor);
|
||||
int ccolor = custom_titles.getColor("COVERS", (const char *) tmp.hdr.id, plugin_ccolor).intVal();
|
||||
tmp.hdr.casecolor = ccolor != plugin_ccolor ? ccolor : plugin_ccolor;
|
||||
|
||||
char tempname[64];
|
||||
(*itr).assign(&(*itr)[(*itr).find_last_of('/') + 1]);
|
||||
if((*itr).find_last_of('.') != string::npos)
|
||||
(*itr).erase((*itr).find_last_of('.'), (*itr).size() - (*itr).find_last_of('.'));
|
||||
strncpy(tempname, (*itr).c_str(), sizeof(tempname));
|
||||
//mbstowcs(tmp.title, tempname, sizeof(tmp.title));
|
||||
//Asciify(tmp.title);
|
||||
wstringEx tmpString;
|
||||
tmpString.fromUTF8(tempname);
|
||||
wcsncpy(tmp.title, tmpString.c_str(), 64);
|
||||
|
||||
gprintf("Found: %s\n", tmp.path);
|
||||
sscanf(plugin.getString("PLUGIN","magic","").c_str(), "%08x", &tmp.hdr.magic); //Plugin magic
|
||||
tmp.hdr.gc_magic = EMU_MAGIC; //Abusing gc_magic for general emu detection ;)
|
||||
headerlist.push_back(tmp);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(gameTDB.IsLoaded())
|
||||
|
@ -708,7 +708,6 @@ int CMenu::main(void)
|
||||
{
|
||||
m_btnMgr.hide(m_mainLblUser[0]);
|
||||
m_btnMgr.hide(m_mainLblUser[1]);
|
||||
m_btnMgr.hide(m_mainBtnConfig);
|
||||
m_btnMgr.hide(m_mainBtnInfo);
|
||||
m_btnMgr.hide(m_mainBtnQuit);
|
||||
m_btnMgr.hide(m_mainBtnFavoritesOn);
|
||||
|
Loading…
x
Reference in New Issue
Block a user