mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-12-25 19:31:58 +01:00
-fixed scummvm games not showing anymore
This commit is contained in:
parent
9f0a4d5a66
commit
cd9b3ca394
@ -1515,6 +1515,8 @@ void CMenu::_initCF(void)
|
||||
if(m_current_view == COVERFLOW_EMU)
|
||||
{
|
||||
string tempname(m_gameList[i].path);
|
||||
if(!m_plugin.isScummVM(m_gameList[i].hdr.magic))
|
||||
{
|
||||
if(tempname.empty() || tempname.find_first_of('/') == string::npos)
|
||||
{
|
||||
continue;
|
||||
@ -1533,6 +1535,9 @@ void CMenu::_initCF(void)
|
||||
tempname.erase(tempname.find_last_of('.'), tempname.size() - tempname.find_last_of('.'));
|
||||
id = dirName+tempname;
|
||||
}
|
||||
else
|
||||
id = tempname;
|
||||
}
|
||||
else
|
||||
id = string((const char *)m_gameList[i].hdr.id, m_current_view == COVERFLOW_CHANNEL ? 4 : 6);
|
||||
string idcats = m_cat.getString("CATEGORIES", id, "").c_str();
|
||||
|
@ -22,6 +22,7 @@ static char* emptyChar = (char*)" ";
|
||||
|
||||
void Plugin::init(string m_pluginsDir)
|
||||
{
|
||||
ScummVM_magic = 0;
|
||||
pluginsDir = m_pluginsDir;
|
||||
//Ready to add plugins
|
||||
adding = true;
|
||||
@ -192,6 +193,8 @@ vector<dir_discHdr> Plugin::ParseScummvmINI(Config &ini, string Device)
|
||||
vector<dir_discHdr> gameHeader;
|
||||
if(!ini.loaded())
|
||||
return gameHeader;
|
||||
ScummVM_magic = Plugins[Plugins.size()-1].magicWord;
|
||||
|
||||
string game(ini.firstDomain());
|
||||
string GameName;
|
||||
dir_discHdr tmp;
|
||||
@ -265,3 +268,8 @@ bool Plugin::isMplayerCE(u32 magic)
|
||||
return (Plugins[Plugin_Pos].magicWord == 0x4D504345);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Plugin::isScummVM(u32 magic)
|
||||
{
|
||||
return (magic == ScummVM_magic);
|
||||
}
|
||||
|
@ -49,12 +49,15 @@ public:
|
||||
void Cleanup();
|
||||
void EndAdd();
|
||||
vector<dir_discHdr> ParseScummvmINI(Config &ini, string Device);
|
||||
bool isScummVM(u32 magic);
|
||||
|
||||
private:
|
||||
s8 GetPluginPosition(u32 magic);
|
||||
|
||||
vector<PluginOptions> Plugins;
|
||||
s8 Plugin_Pos;
|
||||
string pluginsDir;
|
||||
u32 ScummVM_magic;
|
||||
bool adding;
|
||||
};
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user