mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-12-28 12:51:52 +01:00
- fix for saving current coverflow layout number when source button has multiple magic numbers.
- minor fix for last commit.
This commit is contained in:
parent
65a0d1bc59
commit
d4579b57c3
Binary file not shown.
BIN
out/boot.dol
BIN
out/boot.dol
Binary file not shown.
Before Width: | Height: | Size: 3.4 MiB After Width: | Height: | Size: 3.4 MiB |
@ -6,7 +6,7 @@
|
||||
#else
|
||||
#define APP_NAME "WiiFlow Lite"
|
||||
#endif
|
||||
#define APP_VERSION "5.3.0 beta 5"
|
||||
#define APP_VERSION "5.3.0 beta 6"
|
||||
|
||||
#define APP_DATA_DIR "wiiflow"
|
||||
#ifdef APP_WIIFLOW
|
||||
|
@ -220,7 +220,7 @@ static void Add_Homebrew_Dol(char *FullPath)
|
||||
strncpy(ListElement.path, FullPath, sizeof(ListElement.path) - 1);
|
||||
memcpy(ListElement.id, "HB_APP", 6);
|
||||
|
||||
FolderTitle = strrchr(FullPath, '/') + 1;
|
||||
const char *FolderTitle = strrchr(FullPath, '/') + 1;
|
||||
ListElement.casecolor = CustomTitles.getColor("COVERS", FolderTitle, 0xFFFFFF).intVal();
|
||||
const string &CustomTitle = CustomTitles.getString("TITLES", FolderTitle);
|
||||
if(CustomTitle.size() > 0)
|
||||
|
@ -57,7 +57,6 @@ private:
|
||||
u8 enabledPluginsCount;
|
||||
u8 m_catStartPage;
|
||||
u8 m_max_categories;
|
||||
char single_sourcebtn[16];
|
||||
bool m_clearCats;
|
||||
bool m_newGame;
|
||||
bool show_mem;
|
||||
|
@ -1207,17 +1207,20 @@ int CMenu::_getCFVersion()
|
||||
return _getSrcFlow();
|
||||
else if(m_current_view == COVERFLOW_PLUGIN)
|
||||
{
|
||||
m_plugin.GetEnabledPlugins(m_cfg, &enabledPluginsCount);
|
||||
if(enabledPluginsCount == 1)
|
||||
int first = 0;
|
||||
for(u8 i = 0; m_plugin.PluginExist(i); ++i)
|
||||
{
|
||||
for(u8 i = 0; m_plugin.PluginExist(i); ++i)
|
||||
if(m_plugin.GetEnableStatus(m_cfg, m_plugin.getPluginMagic(i)) && m_cfg.has("PLUGIN_CFVERSION", m_plugin.PluginMagicWord))
|
||||
{
|
||||
if(m_plugin.GetEnableStatus(m_cfg, m_plugin.getPluginMagic(i)))
|
||||
return m_cfg.getInt("PLUGIN_CFVERSION", m_plugin.PluginMagicWord, 1);
|
||||
if(first > 0 && m_cfg.getInt("PLUGIN_CFVERSION", m_plugin.PluginMagicWord, 1) != first)
|
||||
return m_cfg.getInt(_domainFromView(), "last_cf_mode", 1);
|
||||
else if(first == 0)
|
||||
first = m_cfg.getInt("PLUGIN_CFVERSION", m_plugin.PluginMagicWord, 1);
|
||||
}
|
||||
}
|
||||
else if(strlen(single_sourcebtn))
|
||||
return m_cfg.getInt("PLUGIN_CFVERSION", single_sourcebtn, 1);
|
||||
if(first == 0)
|
||||
first++;
|
||||
return first;
|
||||
}
|
||||
return m_cfg.getInt(_domainFromView(), "last_cf_mode", 1);
|
||||
}
|
||||
@ -1228,17 +1231,25 @@ void CMenu::_setCFVersion(int version)
|
||||
_setSrcFlow(version);
|
||||
else if(m_current_view == COVERFLOW_PLUGIN)
|
||||
{
|
||||
m_plugin.GetEnabledPlugins(m_cfg, &enabledPluginsCount);
|
||||
if(enabledPluginsCount == 1)
|
||||
int first = 0;
|
||||
for(u8 i = 0; m_plugin.PluginExist(i); ++i)
|
||||
{
|
||||
for(u8 i = 0; m_plugin.PluginExist(i); ++i)
|
||||
if(m_plugin.GetEnableStatus(m_cfg, m_plugin.getPluginMagic(i)) && m_cfg.has("PLUGIN_CFVERSION", m_plugin.PluginMagicWord))
|
||||
{
|
||||
if(m_plugin.GetEnableStatus(m_cfg, m_plugin.getPluginMagic(i)))
|
||||
m_cfg.setInt("PLUGIN_CFVERSION", m_plugin.PluginMagicWord, version);
|
||||
if(first > 0 && m_cfg.getInt("PLUGIN_CFVERSION", m_plugin.PluginMagicWord, 1) != first)
|
||||
{
|
||||
m_cfg.setInt(_domainFromView(), "last_cf_mode", version);
|
||||
return;
|
||||
}
|
||||
else if(first == 0)
|
||||
first = m_cfg.getInt("PLUGIN_CFVERSION", m_plugin.PluginMagicWord, 1);
|
||||
}
|
||||
}
|
||||
else if(strlen(single_sourcebtn))
|
||||
m_cfg.setInt("PLUGIN_CFVERSION", single_sourcebtn, version);
|
||||
for(u8 i = 0; m_plugin.PluginExist(i); ++i)
|
||||
{
|
||||
if(m_plugin.GetEnableStatus(m_cfg, m_plugin.getPluginMagic(i)))
|
||||
m_cfg.setInt("PLUGIN_CFVERSION", m_plugin.PluginMagicWord, version);
|
||||
}
|
||||
}
|
||||
else
|
||||
m_cfg.setInt(_domainFromView(), "last_cf_mode", version);
|
||||
|
@ -36,7 +36,6 @@ void CMenu::_sourceFlow()
|
||||
else
|
||||
m_cfg.remove(SOURCEFLOW_DOMAIN, "current_item");
|
||||
|
||||
memset(single_sourcebtn, 0, 16);
|
||||
memset(btn_selected, 0, 16);
|
||||
strncpy(btn_selected, fmt("BUTTON_%i", hdr->settings[0]), 15);
|
||||
source = m_source.getString(btn_selected, "source", "");
|
||||
@ -62,7 +61,6 @@ void CMenu::_sourceFlow()
|
||||
m_current_view = COVERFLOW_HOMEBREW;
|
||||
else if(source == "allplugins")
|
||||
{
|
||||
strncpy(single_sourcebtn, btn_selected, 16);
|
||||
m_current_view = COVERFLOW_PLUGIN;
|
||||
for(k = 0; k < m_numPlugins; ++k)
|
||||
m_plugin.SetEnablePlugin(m_cfg, k, 2); /* force enable */
|
||||
@ -73,8 +71,6 @@ void CMenu::_sourceFlow()
|
||||
magicNums = m_source.getStrings(btn_selected, "magic", ',');
|
||||
if(magicNums.size() > 0)
|
||||
{
|
||||
if(magicNums.size() > 1)
|
||||
strncpy(single_sourcebtn, btn_selected, 16);
|
||||
m_current_view = COVERFLOW_PLUGIN;
|
||||
for(k = 0; k < m_numPlugins; ++k)
|
||||
m_plugin.SetEnablePlugin(m_cfg, k, 1); /* force disable */
|
||||
@ -401,20 +397,9 @@ bool CMenu::_Source()
|
||||
}
|
||||
if(selectedBtns == 1)
|
||||
{
|
||||
memset(single_sourcebtn, 0, 16);
|
||||
memset(btn_selected, 0, 16);
|
||||
strncpy(btn_selected, fmt("BUTTON_%i", sourceBtn), 15);
|
||||
|
||||
source = m_source.getString(btn_selected, "source", "");
|
||||
if(source == "allplugins")
|
||||
strncpy(single_sourcebtn, btn_selected, 16);
|
||||
else if(source == "plugin")
|
||||
{
|
||||
magicNums.clear();
|
||||
magicNums = m_source.getStrings(btn_selected, "magic", ',');
|
||||
if(magicNums.size() > 1)
|
||||
strncpy(single_sourcebtn, btn_selected, 16);
|
||||
}
|
||||
_setSrcOptions();
|
||||
}
|
||||
|
||||
@ -477,7 +462,6 @@ bool CMenu::_Source()
|
||||
}
|
||||
if(!m_multisource && i <12)
|
||||
{
|
||||
memset(single_sourcebtn, 0, 16);
|
||||
exitSource = true;
|
||||
m_catStartPage = 1;
|
||||
if(source == "dml")
|
||||
@ -503,7 +487,6 @@ bool CMenu::_Source()
|
||||
}
|
||||
else if(source == "allplugins")
|
||||
{
|
||||
strncpy(single_sourcebtn, btn_selected, 16);
|
||||
m_current_view = COVERFLOW_PLUGIN;
|
||||
for(k = 0; k < m_numPlugins; ++k)
|
||||
m_plugin.SetEnablePlugin(m_cfg, k, 2); /* force enable */
|
||||
@ -519,8 +502,6 @@ bool CMenu::_Source()
|
||||
magicNums = m_source.getStrings(btn_selected, "magic", ',');
|
||||
if(magicNums.size() > 0)
|
||||
{
|
||||
if(magicNums.size() > 1)
|
||||
strncpy(single_sourcebtn, btn_selected, 16);
|
||||
for(vector<string>::iterator itr = magicNums.begin(); itr != magicNums.end(); itr++)
|
||||
{
|
||||
s8 exist = m_plugin.GetPluginPosition(strtoul(itr->c_str(), NULL, 16));// make sure magic# is valid
|
||||
@ -764,7 +745,6 @@ void CMenu::_setSrcOptions(void)
|
||||
|
||||
void CMenu::_initSourceMenu()
|
||||
{
|
||||
memset(single_sourcebtn, 0, 16);
|
||||
m_use_source = false;
|
||||
|
||||
if(!m_source.load(fmt("%s/%s/%s", m_sourceDir.c_str(), m_themeName.c_str(), SOURCE_FILENAME)))// check for source_menu/theme/source_menu.ini
|
||||
|
Loading…
Reference in New Issue
Block a user