- now if favorites or categories are on when you launch a game they will be on upon returning to wiiflow.

This commit is contained in:
Fledge68 2019-10-09 18:00:54 -05:00
parent b7024400cd
commit f3bc0d7ce5
4 changed files with 20 additions and 18 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 MiB

After

Width:  |  Height:  |  Size: 3.4 MiB

View File

@ -76,7 +76,8 @@ CMenu::CMenu()
m_use_source = true;
m_sourceflow = false;
m_numPlugins = 0;
m_clearCats = true;
m_clearCats = false;
m_getFavs = true;
m_catStartPage = 1;
cacheCovers = false;
SF_cacheCovers = true;

View File

@ -58,6 +58,7 @@ private:
u8 m_catStartPage;
u8 m_max_categories;
bool m_clearCats;
bool m_getFavs;
bool m_newGame;
bool show_mem;
bool cacheCovers;

View File

@ -239,21 +239,23 @@ void CMenu::_showCF(bool refreshList)
}
}
}
/* setup categories and favorites for filtering the game list below */
if(m_clearCats)// false on boot up and if a source menu button selects a category
{
// do not clear hidden categories to keep games hidden
m_cat.remove("GENERAL", "selected_categories");
m_cat.remove("GENERAL", "required_categories");
}
m_clearCats = true;// set to true for next source
m_favorites = false;
if(m_getFavs || m_cfg.getBool("GENERAL", "save_favorites_mode", false))
m_favorites = m_cfg.getBool(_domainFromView(), "favorites", false);
else
m_cfg.setBool(_domainFromView(), "favorites", false);
m_getFavs = false;
}
/* setup categories and favorites for filtering the game list below */
if(refreshList && m_clearCats)// clear categories unless a source menu btn has selected one
{
// do not clear hidden categories to keep games hidden
m_cat.remove("GENERAL", "selected_categories");
m_cat.remove("GENERAL", "required_categories");
}
m_clearCats = true;
m_favorites = false;
if(m_cfg.getBool("GENERAL", "save_favorites_mode", false))
m_favorites = m_cfg.getBool(_domainFromView(), "favorites", false);
strcpy(cf_domain, "_COVERFLOW");
if(!m_sourceflow && m_current_view == COVERFLOW_HOMEBREW && m_cfg.getBool(HOMEBREW_DOMAIN, "smallbox", true))
strcpy(cf_domain, "_SMALLFLOW");
@ -820,10 +822,8 @@ int CMenu::main(void)
m_btnMgr.show(m_mainBtnCategories);
m_btnMgr.show(m_mainBtnConfig);
m_btnMgr.show(m_mainBtnHome);
static bool change = m_favorites;
m_btnMgr.show(m_favorites ? m_mainBtnFavoritesOn : m_mainBtnFavoritesOff, change != m_favorites);
m_btnMgr.hide(m_favorites ? m_mainBtnFavoritesOff : m_mainBtnFavoritesOn, change != m_favorites);
change = m_favorites;
m_btnMgr.show(m_favorites ? m_mainBtnFavoritesOn : m_mainBtnFavoritesOff, true);
m_btnMgr.hide(m_favorites ? m_mainBtnFavoritesOff : m_mainBtnFavoritesOn, true);
}
else
{