mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-24 04:09:15 +01:00
-added new option to wiiflow.ini, "skip_list_check", if you enable
it wiiflow will not check for new games on boot, that will speed up bootup amazingly for people with alot of wii games (disabled by def) -disabled extended list check by default
This commit is contained in:
parent
14d4efe478
commit
eba8ab8398
@ -35,24 +35,24 @@ void CachedList::Load(string path, string containing, string m_lastLanguage, Con
|
||||
gprintf("%s\n", path.c_str());
|
||||
if(stat(path.c_str(), &filestat) == -1)
|
||||
return;
|
||||
|
||||
|
||||
bool update_lang = m_lastLanguage != m_curLanguage;
|
||||
bool noDB = stat(m_database.c_str(), &cache) == -1;
|
||||
bool mtimes = filestat.st_mtime > cache.st_mtime;
|
||||
if(strcasestr(m_discinf.c_str(), "wbfs") != NULL && stat(m_discinf.c_str(), &discinfo) != -1)
|
||||
ditimes = discinfo.st_mtime > cache.st_mtime;
|
||||
|
||||
m_update = update_lang || noDB || mtimes || ditimes;
|
||||
m_update = update_lang || noDB || (!m_skipcheck && (mtimes || ditimes));
|
||||
if(m_update)
|
||||
gprintf("Cache of %s is being updated because:\n", path.c_str());
|
||||
if(update_lang)
|
||||
gprintf("Languages are different!\nOld language string: %s\nNew language string: %s\n", m_lastLanguage.c_str(), m_curLanguage.c_str());
|
||||
if(noDB)
|
||||
gprintf("A database was not found!\n");
|
||||
if(mtimes || ditimes)
|
||||
if(!m_skipcheck && (mtimes || ditimes))
|
||||
gprintf("The WBFS folder was modified!\nCache date: %i\nFolder date: %i\n", cache.st_mtime, filestat.st_mtime);
|
||||
|
||||
if(m_extcheck && !m_update)
|
||||
if(m_extcheck && !m_update && !m_skipcheck)
|
||||
{
|
||||
bool m_chupdate = false;
|
||||
DIR *dir = opendir(path.c_str());
|
||||
@ -66,7 +66,7 @@ void CachedList::Load(string path, string containing, string m_lastLanguage, Con
|
||||
break;
|
||||
}
|
||||
m_update = m_chupdate;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(update_games)
|
||||
|
@ -19,8 +19,8 @@ enum {
|
||||
|
||||
class CachedList : public vector<dir_discHdr>
|
||||
{
|
||||
public:
|
||||
void Init(string cachedir, string settingsDir, string curLanguage, string DMLgameDir, bool extcheck) /* Initialize Private Variables */
|
||||
public:
|
||||
void Init(string cachedir, string settingsDir, string curLanguage, string DMLgameDir, bool extcheck, bool skipcheck) /* Initialize Private Variables */
|
||||
{
|
||||
m_cacheDir = cachedir;
|
||||
m_settingsDir = settingsDir;
|
||||
@ -29,6 +29,7 @@ class CachedList : public vector<dir_discHdr>
|
||||
m_database = "";
|
||||
m_update = false;
|
||||
m_extcheck = extcheck;
|
||||
m_skipcheck = skipcheck;
|
||||
m_DMLgameDir = DMLgameDir;
|
||||
for(u32 i = 0; i < COVERFLOW_MAX; i++)
|
||||
force_update[i] = false;
|
||||
@ -49,30 +50,31 @@ class CachedList : public vector<dir_discHdr>
|
||||
}
|
||||
}
|
||||
|
||||
void Load(string path, string containing, string m_lastLanguage, Config &m_plugin);
|
||||
void Load(string path, string containing, string m_lastLanguage, Config &m_plugin);
|
||||
void LoadChannels(string path, u32 channelType, string m_lastLanguage);
|
||||
|
||||
void Unload(){if(m_loaded) {this->clear(); m_loaded = false; m_database = "";}};
|
||||
void Save() {if(m_loaded) CCache(*this, m_database, SAVE);} /* Save All */
|
||||
void Unload(){if(m_loaded) {this->clear(); m_loaded = false; m_database = "";}};
|
||||
void Save() {if(m_loaded) CCache(*this, m_database, SAVE);} /* Save All */
|
||||
|
||||
void Get(dir_discHdr tmp, u32 index) {if(m_loaded) CCache(tmp, m_database, index, LOAD);} /* Load One */
|
||||
void Set(dir_discHdr tmp, u32 index) {if(m_loaded) CCache(tmp, m_database, index, SAVE);} /* Save One */
|
||||
void Get(dir_discHdr tmp, u32 index) {if(m_loaded) CCache(tmp, m_database, index, LOAD);} /* Load One */
|
||||
void Set(dir_discHdr tmp, u32 index) {if(m_loaded) CCache(tmp, m_database, index, SAVE);} /* Save One */
|
||||
|
||||
void Add(dir_discHdr tmp) {if(m_loaded) CCache(*this, m_database, tmp, ADD);} /* Add One */
|
||||
void Remove(u32 index) {if(m_loaded) CCache(*this, m_database, index, REMOVE);} /* Remove One */
|
||||
|
||||
void Add(dir_discHdr tmp) {if(m_loaded) CCache(*this, m_database, tmp, ADD);} /* Add One */
|
||||
void Remove(u32 index) {if(m_loaded) CCache(*this, m_database, index, REMOVE);} /* Remove One */
|
||||
|
||||
void SetLanguage(string curLanguage) { m_curLanguage = curLanguage; }
|
||||
private:
|
||||
string make_db_name(string path);
|
||||
private:
|
||||
string make_db_name(string path);
|
||||
|
||||
bool m_loaded;
|
||||
bool m_update;
|
||||
bool m_wbfsFS;
|
||||
bool m_loaded;
|
||||
bool m_update;
|
||||
bool m_wbfsFS;
|
||||
bool m_extcheck;
|
||||
bool m_skipcheck;
|
||||
u8 force_update[COVERFLOW_MAX];
|
||||
CList<dir_discHdr> list;
|
||||
string m_database;
|
||||
string m_cacheDir;
|
||||
CList<dir_discHdr> list;
|
||||
string m_database;
|
||||
string m_cacheDir;
|
||||
string m_settingsDir;
|
||||
string m_curLanguage;
|
||||
string m_lastLanguage;
|
||||
|
@ -416,11 +416,11 @@ void CMenu::init(void)
|
||||
m_curLanguage = CMenu::_translations[0];
|
||||
m_loc.load(fmt("%s/%s.ini", m_languagesDir.c_str(), m_curLanguage.c_str()));
|
||||
}
|
||||
|
||||
bool extcheck = m_cfg.getBool("GENERAL", "extended_list_check", true);
|
||||
bool extcheck = m_cfg.getBool("GENERAL", "extended_list_check", false);
|
||||
bool skipcheck = m_cfg.getBool("GENERAL", "skip_list_check", false);
|
||||
m_tempView = false;
|
||||
|
||||
m_gameList.Init(m_listCacheDir, m_settingsDir, m_loc.getString(m_curLanguage, "gametdb_code", "EN"), m_DMLgameDir, extcheck);
|
||||
m_gameList.Init(m_listCacheDir, m_settingsDir, m_loc.getString(m_curLanguage, "gametdb_code", "EN"), m_DMLgameDir, extcheck, skipcheck);
|
||||
|
||||
m_aa = 3;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user