mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-12-24 19:01:56 +01:00
-updated cache system for plugins, it now wont use folder names
for the db files but its plugin magic to prevent double entries because of same paths for alternative plugins -removed some annoying debug prints yet again
This commit is contained in:
parent
dd50c080a2
commit
f6e7fd2332
@ -74,13 +74,13 @@ bool GameTDB::OpenFile(const char *filepath)
|
||||
if(!filepath)
|
||||
return false;
|
||||
|
||||
gprintf("Trying to open '%s'...", filepath);
|
||||
//gprintf("Trying to open '%s'...", filepath);
|
||||
file = fopen(filepath, "rb");
|
||||
if(file)
|
||||
{
|
||||
this->filepath = filepath;
|
||||
|
||||
gprintf("success\n");
|
||||
//gprintf("success\n");
|
||||
|
||||
int pos;
|
||||
string OffsetsPath = filepath;
|
||||
@ -89,7 +89,7 @@ bool GameTDB::OpenFile(const char *filepath)
|
||||
else
|
||||
OffsetsPath.clear(); //! Relative path
|
||||
|
||||
gprintf("Checking game offsets\n");
|
||||
//gprintf("Checking game offsets\n");
|
||||
LoadGameOffsets(OffsetsPath.c_str());
|
||||
/*if (!isParsed)
|
||||
{
|
||||
@ -97,7 +97,7 @@ bool GameTDB::OpenFile(const char *filepath)
|
||||
CheckTitlesIni(OffsetsPath.c_str());
|
||||
}*/
|
||||
}
|
||||
else gprintf("failed\n");
|
||||
//else gprintf("failed\n");
|
||||
|
||||
isLoaded = (file != NULL);
|
||||
return isLoaded;
|
||||
@ -1024,7 +1024,7 @@ int GameTDB::GetCaseVersions(const char *id)
|
||||
char *data = GetGameNode(id);
|
||||
if(!data)
|
||||
{
|
||||
gprintf("GameTDB: GameNode for %s not found\n", id);
|
||||
//gprintf("GameTDB: GameNode for %s not found\n", id);
|
||||
return altcase;
|
||||
}
|
||||
|
||||
|
@ -3,10 +3,13 @@
|
||||
|
||||
void CachedList::Load(string path, string containing, string m_lastLanguage, Config &m_plugin) /* Load All */
|
||||
{
|
||||
const char* partition = DeviceName[DeviceHandle.PathToDriveType(path.c_str())];
|
||||
//gprintf("\nLoading files containing %s in %s\n", containing.c_str(), path.c_str());
|
||||
m_loaded = false;
|
||||
m_database = sfmt("%s/%s.db", m_cacheDir.c_str(), (make_db_name(path)).c_str());
|
||||
|
||||
if(m_plugin.loaded())
|
||||
m_database = sfmt("%s/%s_%s.db", m_cacheDir.c_str(), partition, lowerCase(m_plugin.getString("PLUGIN","magic")).c_str());
|
||||
else
|
||||
m_database = sfmt("%s/%s.db", m_cacheDir.c_str(), (make_db_name(path)).c_str());
|
||||
m_wbfsFS = strncasecmp(DeviceHandle.PathToFSName(path.c_str()), "WBFS", 4) == 0;
|
||||
|
||||
bool update_games = false;
|
||||
@ -18,12 +21,9 @@ void CachedList::Load(string path, string containing, string m_lastLanguage, Con
|
||||
if(!m_wbfsFS)
|
||||
{
|
||||
//gprintf("Database file: %s\n", m_database.c_str());
|
||||
|
||||
update_games = strcasestr(path.c_str(), "wbfs") != NULL && force_update[COVERFLOW_USB];
|
||||
update_homebrew = strcasestr(path.c_str(), "apps") != NULL && force_update[COVERFLOW_HOMEBREW];
|
||||
update_emu = strcasestr(path.c_str(), m_plugin.getString("PLUGIN","romDir","").c_str()) != NULL && force_update[COVERFLOW_EMU];
|
||||
|
||||
const char* partition = DeviceName[DeviceHandle.PathToDriveType(path.c_str())];
|
||||
update_emu = m_plugin.loaded() && force_update[COVERFLOW_EMU];
|
||||
update_dml = strcasestr(path.c_str(), fmt(strncmp(partition, "sd", 2) != 0 ? m_DMLgameDir.c_str() : "%s:/games", partition)) != NULL && force_update[COVERFLOW_DML];
|
||||
|
||||
//gprintf("update_games=%d update_homebrew=%d update_dml=%d, update_emu=%d\n", update_games, update_homebrew, update_dml, update_emu);
|
||||
@ -133,7 +133,7 @@ void CachedList::LoadChannels(string path, u32 channelType, string m_lastLanguag
|
||||
|
||||
if(m_update)
|
||||
{
|
||||
//gprintf("Updating channels\n");
|
||||
gprintf("Updating channels\n");
|
||||
list.GetChannels(*this, m_settingsDir, channelType, m_curLanguage);
|
||||
|
||||
m_loaded = true;
|
||||
|
Loading…
Reference in New Issue
Block a user