-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:
fix94.1 2012-08-22 05:21:15 +00:00
parent 14d4efe478
commit eba8ab8398
3 changed files with 28 additions and 26 deletions

View File

@ -42,17 +42,17 @@ void CachedList::Load(string path, string containing, string m_lastLanguage, Con
if(strcasestr(m_discinf.c_str(), "wbfs") != NULL && stat(m_discinf.c_str(), &discinfo) != -1) if(strcasestr(m_discinf.c_str(), "wbfs") != NULL && stat(m_discinf.c_str(), &discinfo) != -1)
ditimes = discinfo.st_mtime > cache.st_mtime; 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) if(m_update)
gprintf("Cache of %s is being updated because:\n", path.c_str()); gprintf("Cache of %s is being updated because:\n", path.c_str());
if(update_lang) if(update_lang)
gprintf("Languages are different!\nOld language string: %s\nNew language string: %s\n", m_lastLanguage.c_str(), m_curLanguage.c_str()); gprintf("Languages are different!\nOld language string: %s\nNew language string: %s\n", m_lastLanguage.c_str(), m_curLanguage.c_str());
if(noDB) if(noDB)
gprintf("A database was not found!\n"); 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); 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; bool m_chupdate = false;
DIR *dir = opendir(path.c_str()); DIR *dir = opendir(path.c_str());

View File

@ -19,8 +19,8 @@ enum {
class CachedList : public vector<dir_discHdr> class CachedList : public vector<dir_discHdr>
{ {
public: public:
void Init(string cachedir, string settingsDir, string curLanguage, string DMLgameDir, bool extcheck) /* Initialize Private Variables */ void Init(string cachedir, string settingsDir, string curLanguage, string DMLgameDir, bool extcheck, bool skipcheck) /* Initialize Private Variables */
{ {
m_cacheDir = cachedir; m_cacheDir = cachedir;
m_settingsDir = settingsDir; m_settingsDir = settingsDir;
@ -29,6 +29,7 @@ class CachedList : public vector<dir_discHdr>
m_database = ""; m_database = "";
m_update = false; m_update = false;
m_extcheck = extcheck; m_extcheck = extcheck;
m_skipcheck = skipcheck;
m_DMLgameDir = DMLgameDir; m_DMLgameDir = DMLgameDir;
for(u32 i = 0; i < COVERFLOW_MAX; i++) for(u32 i = 0; i < COVERFLOW_MAX; i++)
force_update[i] = false; force_update[i] = false;
@ -62,13 +63,14 @@ class CachedList : public vector<dir_discHdr>
void Remove(u32 index) {if(m_loaded) CCache(*this, m_database, index, REMOVE);} /* Remove One */ void Remove(u32 index) {if(m_loaded) CCache(*this, m_database, index, REMOVE);} /* Remove One */
void SetLanguage(string curLanguage) { m_curLanguage = curLanguage; } void SetLanguage(string curLanguage) { m_curLanguage = curLanguage; }
private: private:
string make_db_name(string path); string make_db_name(string path);
bool m_loaded; bool m_loaded;
bool m_update; bool m_update;
bool m_wbfsFS; bool m_wbfsFS;
bool m_extcheck; bool m_extcheck;
bool m_skipcheck;
u8 force_update[COVERFLOW_MAX]; u8 force_update[COVERFLOW_MAX];
CList<dir_discHdr> list; CList<dir_discHdr> list;
string m_database; string m_database;

View File

@ -416,11 +416,11 @@ void CMenu::init(void)
m_curLanguage = CMenu::_translations[0]; m_curLanguage = CMenu::_translations[0];
m_loc.load(fmt("%s/%s.ini", m_languagesDir.c_str(), m_curLanguage.c_str())); m_loc.load(fmt("%s/%s.ini", m_languagesDir.c_str(), m_curLanguage.c_str()));
} }
bool extcheck = m_cfg.getBool("GENERAL", "extended_list_check", false);
bool extcheck = m_cfg.getBool("GENERAL", "extended_list_check", true); bool skipcheck = m_cfg.getBool("GENERAL", "skip_list_check", false);
m_tempView = 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; m_aa = 3;