From 739d7892b3b45b5b8f93dd713c15e7a93b787464 Mon Sep 17 00:00:00 2001 From: "overjoy.psm" Date: Tue, 31 Jan 2012 23:44:54 +0000 Subject: [PATCH] * Pressing 'B' on 'config button' will now force a cache update for current view * Added missing break;'s in UpdateCache function (menu.cpp) * Added missing stuff for DML update --- source/list/cachedlist.cpp | 7 +++++-- source/menu/menu.cpp | 3 +++ source/menu/menu_main.cpp | 7 +++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/source/list/cachedlist.cpp b/source/list/cachedlist.cpp index fc8e01fe..a7a61deb 100644 --- a/source/list/cachedlist.cpp +++ b/source/list/cachedlist.cpp @@ -13,13 +13,15 @@ void CachedList::Load(string path, string containing) /* Load All bool update_games = false; bool update_homebrew = false; + bool update_dml = false; if(!m_wbfsFS) { 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_dml = strcasestr(path.c_str(), "games") != NULL && force_update[COVERFLOW_DML]; + gprintf("update_games=%d update_homebrew=%d\n", update_games, update_homebrew); - if(update_games || update_homebrew) + if(update_games || update_homebrew || update_dml) remove(m_database.c_str()); struct stat filestat, cache; @@ -100,6 +102,7 @@ void CachedList::LoadChannels(string path, u32 channelType) if(m_update) { + gprintf("Updating\n"); list.GetChannels(*this, m_settingsDir, channelType, m_channelLang); m_loaded = true; diff --git a/source/menu/menu.cpp b/source/menu/menu.cpp index 3e7143a7..458314b3 100644 --- a/source/menu/menu.cpp +++ b/source/menu/menu.cpp @@ -1794,10 +1794,13 @@ void CMenu::UpdateCache(u32 view) { case COVERFLOW_CHANNEL: domain = "NAND"; + break; case COVERFLOW_HOMEBREW: domain = "HOMEBREW"; + break; case COVERFLOW_DML: domain = "DML"; + break; default: domain = "GAMES"; } diff --git a/source/menu/menu_main.cpp b/source/menu/menu_main.cpp index f0d5ec17..a8231733 100644 --- a/source/menu/menu_main.cpp +++ b/source/menu/menu_main.cpp @@ -454,6 +454,13 @@ int CMenu::main(void) m_btnMgr.show(m_mainLblNotice); } } + else if(m_btnMgr.selected(m_mainBtnConfig)) + { + m_gameList.SetLanguage(m_loc.getString(m_curLanguage, "gametdb_code", "EN").c_str()); + + UpdateCache(m_current_view); + LoadView(); + } } else if (done==0 && m_cat.getBool("GENERAL", "category_on_start", false)) {