From c1be6e78b8a7ef5d744d5b55dd4bc4d788c1d58c Mon Sep 17 00:00:00 2001 From: fledge68 Date: Tue, 6 Aug 2013 21:31:25 +0000 Subject: [PATCH] - Fix for UpdateCache() to work properly and fix for wii_games_dir to work properly to set the wii games folder and moved it from GENERAL to GAMES in wiiflow.ini --- source/menu/menu.cpp | 22 +++++++++++++++++++--- source/menu/menu_game.cpp | 2 +- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/source/menu/menu.cpp b/source/menu/menu.cpp index d8117c30..051b7e30 100644 --- a/source/menu/menu.cpp +++ b/source/menu/menu.cpp @@ -199,7 +199,7 @@ void CMenu::init() _netInit(); /* Our Wii game dir */ memset(wii_games_dir, 0, 64); - strncpy(wii_games_dir, m_cfg.getString("GENERAL", "wii_games_dir", GAMES_DIR).c_str(), 64); + strncpy(wii_games_dir, m_cfg.getString(WII_DOMAIN, "wii_games_dir", GAMES_DIR).c_str(), 64); if(strncmp(wii_games_dir, "%s:/", 4) != 0) strcpy(wii_games_dir, GAMES_DIR); gprintf("Wii Games Directory: %s\n", wii_games_dir); @@ -2221,7 +2221,7 @@ bool CMenu::_loadGameList(void) return false; DeviceHandle.OpenWBFS(currentPartition); - string gameDir(fmt(GAMES_DIR, DeviceName[currentPartition])); + string gameDir(fmt(wii_games_dir, DeviceName[currentPartition])); string cacheDir(fmt("%s/%s_wii.db", m_listCacheDir.c_str(), DeviceName[currentPartition])); bool updateCache = m_cfg.getBool(WII_DOMAIN, "update_cache"); m_gameList.CreateList(COVERFLOW_USB, currentPartition, gameDir, stringToVector(".wbfs|.iso", '|'), cacheDir, updateCache); @@ -2538,7 +2538,23 @@ void CMenu::UpdateCache(u32 view) UpdateCache(COVERFLOW_CHANNEL); return; } - m_cfg.setBool(_domainFromView(), "update_cache", true); + switch(view) + { + case COVERFLOW_CHANNEL: + m_cfg.setBool(CHANNEL_DOMAIN, "update_cache", true); + break; + case COVERFLOW_HOMEBREW: + m_cfg.setBool(HOMEBREW_DOMAIN, "update_cache", true); + break; + case COVERFLOW_DML: + m_cfg.setBool(GC_DOMAIN, "update_cache", true); + break; + case COVERFLOW_PLUGIN: + m_cfg.setBool(PLUGIN_DOMAIN, "update_cache", true); + break; + default: + m_cfg.setBool(WII_DOMAIN, "update_cache", true); + } } int CMenu::MIOSisDML() diff --git a/source/menu/menu_game.cpp b/source/menu/menu_game.cpp index 26cd49bf..eeef7194 100644 --- a/source/menu/menu_game.cpp +++ b/source/menu/menu_game.cpp @@ -781,7 +781,7 @@ void CMenu::directlaunch(const char *GameID) if(!DeviceHandle.IsInserted(currentPartition)) continue; DeviceHandle.OpenWBFS(currentPartition); - string gameDir(fmt(GAMES_DIR, DeviceName[currentPartition])); + string gameDir(fmt(wii_games_dir, DeviceName[currentPartition])); string cacheDir(fmt("%s/%s_wii.db", m_listCacheDir.c_str(), DeviceName[currentPartition])); m_gameList.CreateList(COVERFLOW_USB, currentPartition, gameDir, stringToVector(".wbfs|.iso", '|'), cacheDir, false);