-added automatic lists cache folder deletion if a different svn

revision is found in the wiiflow.ini from now on (untested)
This commit is contained in:
fix94.1 2012-12-03 20:32:05 +00:00
parent c06ff6877f
commit 852c56a9da
3 changed files with 10 additions and 3 deletions

View File

@ -296,7 +296,7 @@ void CMenu::init()
_load_installed_cioses();
else
_installed_cios[CurrentIOS.Version] = CurrentIOS.Version;
/* Path Settings */
snprintf(m_app_update_drive, sizeof(m_app_update_drive), "%s:/", drive);
m_dataDir = fmt("%s:/%s", drive, APPDATA_DIR);
gprintf("Data Directory: %s\n", m_dataDir.c_str());
@ -328,6 +328,12 @@ void CMenu::init()
m_screenshotDir = m_cfg.getString("GENERAL", "dir_screenshot", fmt("%s/screenshots", m_dataDir.c_str()));
m_helpDir = m_cfg.getString("GENERAL", "dir_help", fmt("%s/help", m_dataDir.c_str()));
/* Cache Reload Checks */
u32 ini_rev = m_cfg.getInt("GENERAL", "ini_rev", 0);
if(ini_rev != SVN_REV_NUM)
fsop_deleteFolder(m_listCacheDir.c_str());
m_cfg.setInt("GENERAL", "ini_rev", SVN_REV_NUM);
//DeviceHandler::SetWatchdog(m_cfg.getUInt("GENERAL", "watchdog_timeout", 10));
const char *domain = _domainFromView();

View File

@ -1093,6 +1093,7 @@ private:
static int _version[9];
static const SCFParamDesc _cfParams[];
static const int _nbCfgPages;
static const u32 SVN_REV_NUM;
};
#define ARRAY_SIZE(a) (sizeof a / sizeof a[0])

View File

@ -5,7 +5,7 @@
#include "loader/wbfs.h"
int version_num = 0, num_versions = 0, i;
const u32 SVN_REV_NUM = atoi(SVN_REV);
const u32 CMenu::SVN_REV_NUM = atoi(SVN_REV);
int CMenu::_version[9] = {0, SVN_REV_NUM, SVN_REV_NUM, SVN_REV_NUM, SVN_REV_NUM, SVN_REV_NUM, SVN_REV_NUM, SVN_REV_NUM, SVN_REV_NUM};
const int pixels_to_skip = 10;