mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-01 00:55:06 +01:00
Merge branch 'master' of https://github.com/Fledge68/WiiFlow_Lite
This commit is contained in:
commit
67dc2fa7fb
BIN
out/boot.dol
BIN
out/boot.dol
Binary file not shown.
Before Width: | Height: | Size: 4.4 MiB After Width: | Height: | Size: 4.4 MiB |
@ -312,7 +312,6 @@ static void Add_Plugin_Game(char *FullPath)
|
||||
m_cacheList.push_back(ListElement);
|
||||
}
|
||||
|
||||
/* notes: "description" is used as the title because it basically is the title */
|
||||
/* the [GameDomain] is used as the path even though it isn't the path */
|
||||
/* the [GameDomain] is usually short without any '/' */
|
||||
/* in scummvm.ini the path is the path without the exe or main app file added on */
|
||||
@ -338,16 +337,24 @@ void ListGenerator::ParseScummvmINI(Config &ini, const char *Device, const char
|
||||
|
||||
Config m_crc;
|
||||
if(platform != NULL)
|
||||
{
|
||||
m_crc.load(fmt("%s/%s/%s.ini", datadir, platform, platform));
|
||||
/* Load platform name.xml database to get game's info using the gameID */
|
||||
gameTDB.OpenFile(fmt("%s/%s/%s.xml", datadir, platform, platform));
|
||||
if(gameTDB.IsLoaded())
|
||||
gameTDB.SetLanguageCode(gameTDB_Language.c_str());
|
||||
}
|
||||
|
||||
const char *GameDomain = ini.firstDomain().c_str();
|
||||
while(1)
|
||||
{
|
||||
if(strlen(GameDomain) < 2)
|
||||
break;
|
||||
char GameName[64];
|
||||
// GameName has to be at least as large as the longest key in m_crc,
|
||||
// otherwise the game won't be found.
|
||||
char GameName[128];
|
||||
memset(GameName, 0, sizeof(GameName));
|
||||
strncpy(GameName, ini.getString(GameDomain, "description").c_str(), 63);
|
||||
strncpy(GameName, ini.getString(GameDomain, "description").c_str(), sizeof(GameName)-1);
|
||||
if(strlen(GameName) < 2 || strncasecmp(Device, ini.getString(GameDomain, "path").c_str(), 2) != 0)
|
||||
{
|
||||
GameDomain = ini.nextDomain().c_str();
|
||||
@ -371,8 +378,20 @@ void ListGenerator::ParseScummvmINI(Config &ini, const char *Device, const char
|
||||
|
||||
memset((void*)&ListElement, 0, sizeof(dir_discHdr));
|
||||
memcpy(ListElement.id, GameID.c_str(), 6);
|
||||
|
||||
const char *gameTDB_Title = NULL;
|
||||
if(gameTDB.IsLoaded() && m_cacheList.usePluginDBTitles)
|
||||
{
|
||||
gameTDB.GetTitle(ListElement.id, gameTDB_Title, true);
|
||||
}
|
||||
|
||||
if(gameTDB_Title != NULL && gameTDB_Title[0] != '\0')
|
||||
mbstowcs(ListElement.title, gameTDB_Title, 63);
|
||||
else
|
||||
mbstowcs(ListElement.title, GameName, 63);
|
||||
Asciify(ListElement.title);
|
||||
strcpy(ListElement.path, GameDomain);
|
||||
|
||||
ListElement.settings[0] = m_cacheList.Magic; //scummvm magic
|
||||
ListElement.casecolor = m_cacheList.Color;
|
||||
ListElement.type = TYPE_PLUGIN;
|
||||
@ -380,6 +399,7 @@ void ListGenerator::ParseScummvmINI(Config &ini, const char *Device, const char
|
||||
GameDomain = ini.nextDomain().c_str();
|
||||
}
|
||||
m_crc.unload();
|
||||
CloseConfigs();
|
||||
if(!this->empty() && !DBName.empty()) /* Write a new Cache */
|
||||
CCache(*this, DBName, SAVE);
|
||||
}
|
||||
|
@ -2578,6 +2578,7 @@ bool CMenu::_loadPluginList()
|
||||
platformName = m_platform.getString("PLUGINS", m_plugin.PluginMagicWord);
|
||||
m_cacheList.Color = m_plugin.GetCaseColor(i);
|
||||
m_cacheList.Magic = m_plugin.GetPluginMagic(i);
|
||||
m_cacheList.usePluginDBTitles = m_cfg.getBool(PLUGIN_DOMAIN, "database_titles", true);
|
||||
m_cacheList.ParseScummvmINI(scummvm, DeviceName[currentPartition], m_pluginDataDir.c_str(), platformName.c_str(), cachedListFile, updateCache);
|
||||
for(vector<dir_discHdr>::iterator tmp_itr = m_cacheList.begin(); tmp_itr != m_cacheList.end(); tmp_itr++)
|
||||
m_gameList.push_back(*tmp_itr);
|
||||
|
@ -790,6 +790,7 @@ private:
|
||||
// menu shows
|
||||
void _showMain(void);
|
||||
void _showCF(bool refreshList = false);
|
||||
void _showTotalGames(const int numberOfGames);
|
||||
void _showError(void);
|
||||
void _showConfigMain(void);
|
||||
void _showConfigGC(void);
|
||||
|
@ -121,6 +121,13 @@ void CMenu::_showMain()
|
||||
_showCF(m_refreshGameList);
|
||||
}
|
||||
|
||||
void CMenu::_showTotalGames(const int numberOfGames)
|
||||
{
|
||||
m_showtimer = 240;
|
||||
m_btnMgr.setText(m_mainLblNotice, wfmt(_fmt("main7", L"Total Games: %i"), numberOfGames));
|
||||
m_btnMgr.show(m_mainLblNotice);
|
||||
}
|
||||
|
||||
void CMenu::_showCF(bool refreshList)
|
||||
{
|
||||
m_refreshGameList = false;
|
||||
@ -345,9 +352,7 @@ void CMenu::_showCF(bool refreshList)
|
||||
if(m_sourceflow || m_current_view == COVERFLOW_HOMEBREW)
|
||||
return;
|
||||
|
||||
m_showtimer = 240;
|
||||
m_btnMgr.setText(m_mainLblNotice, wfmt(_fmt("main7", L"Total Games: %i"), CoverFlow.size()));
|
||||
m_btnMgr.show(m_mainLblNotice);
|
||||
_showTotalGames(CoverFlow.size());
|
||||
}
|
||||
|
||||
int CMenu::main(void)
|
||||
@ -577,6 +582,7 @@ int CMenu::main(void)
|
||||
{
|
||||
m_refreshGameList = false;
|
||||
_initCF();
|
||||
_showTotalGames(CoverFlow.size());
|
||||
}
|
||||
}
|
||||
else if(m_btnMgr.selected(m_mainBtnDVD))
|
||||
@ -615,9 +621,7 @@ int CMenu::main(void)
|
||||
m_favorites = !m_favorites;
|
||||
m_cfg.setBool(_domainFromView(), "favorites", m_favorites);
|
||||
_initCF();
|
||||
m_showtimer = 240;
|
||||
m_btnMgr.setText(m_mainLblNotice, wfmt(_fmt("main7", L"Total Games: %i"), CoverFlow.size()));
|
||||
m_btnMgr.show(m_mainLblNotice);
|
||||
_showTotalGames(CoverFlow.size());
|
||||
}
|
||||
else if(!CoverFlow.empty() && CoverFlow.select())
|
||||
{
|
||||
@ -646,6 +650,7 @@ int CMenu::main(void)
|
||||
{
|
||||
m_refreshGameList = false;
|
||||
_initCF();
|
||||
_showTotalGames(CoverFlow.size());
|
||||
}
|
||||
else
|
||||
CoverFlow.cancel();
|
||||
|
Loading…
Reference in New Issue
Block a user