mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-27 05:34:15 +01:00
- only change channels type when needed.
This commit is contained in:
parent
1fa1054f04
commit
b878b9e2ee
BIN
out/boot.dol
BIN
out/boot.dol
Binary file not shown.
Before Width: | Height: | Size: 4.4 MiB After Width: | Height: | Size: 4.4 MiB |
@ -2555,7 +2555,6 @@ bool CMenu::_loadChannelList(void)
|
||||
bool CMenu::_loadPluginList()
|
||||
{
|
||||
bool updateCache = m_cfg.getBool(PLUGIN_DOMAIN, "update_cache");
|
||||
int channels_type = min(max(1, m_cfg.getInt(CHANNEL_DOMAIN, "channels_type", CHANNELS_REAL)), (int)ARRAY_SIZE(CMenu::_ChannelsType));
|
||||
gprintf("Adding plugins list\n");
|
||||
for(u8 i = 0; m_plugin.PluginExist(i); ++i)
|
||||
{
|
||||
@ -2589,18 +2588,10 @@ bool CMenu::_loadPluginList()
|
||||
m_cfg.setBool(WII_DOMAIN, "update_cache", true);
|
||||
_loadWiiList();
|
||||
}
|
||||
else if(strncasecmp(m_plugin.PluginMagicWord, NAND_PMAGIC, 8) == 0)//NAND
|
||||
else if(strncasecmp(m_plugin.PluginMagicWord, NAND_PMAGIC, 8) == 0 || strncasecmp(m_plugin.PluginMagicWord, ENAND_PMAGIC, 8) == 0)//NAND
|
||||
{
|
||||
if(updateCache)
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "update_cache", true);
|
||||
m_cfg.setInt(CHANNEL_DOMAIN, "channels_type", CHANNELS_REAL);
|
||||
_loadChannelList();
|
||||
}
|
||||
else if(strncasecmp(m_plugin.PluginMagicWord, ENAND_PMAGIC, 8) == 0)//ENAN
|
||||
{
|
||||
if(updateCache)
|
||||
m_cfg.setBool(CHANNEL_DOMAIN, "update_cache", true);
|
||||
m_cfg.setInt(CHANNEL_DOMAIN, "channels_type", CHANNELS_EMU);
|
||||
_loadChannelList();
|
||||
}
|
||||
else
|
||||
@ -2661,7 +2652,6 @@ bool CMenu::_loadPluginList()
|
||||
}
|
||||
}
|
||||
m_cfg.remove(PLUGIN_DOMAIN, "update_cache");
|
||||
m_cfg.setInt(CHANNEL_DOMAIN, "channels_type", channels_type);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -159,7 +159,8 @@ void CMenu::_PluginSettings()
|
||||
}
|
||||
_hidePluginSettings();
|
||||
|
||||
int channels_type = 0;
|
||||
int channels_type = m_cfg.getInt(CHANNEL_DOMAIN, "channels_type");
|
||||
u8 first = 1;
|
||||
string enabledMagics;
|
||||
enabledPluginsCount = 0;
|
||||
for(u8 i = 0; m_plugin.PluginExist(i); i++)
|
||||
@ -173,10 +174,18 @@ void CMenu::_PluginSettings()
|
||||
else
|
||||
enabledMagics.append(',' + magic);
|
||||
|
||||
if(magic == ENAND_PMAGIC)
|
||||
channels_type |= CHANNELS_EMU;
|
||||
else if(magic == NAND_PMAGIC)
|
||||
channels_type |= CHANNELS_REAL;
|
||||
if(magic == ENAND_PMAGIC || magic == NAND_PMAGIC)
|
||||
{
|
||||
if(first)
|
||||
{
|
||||
first--;
|
||||
channels_type = 0;
|
||||
}
|
||||
if(magic == ENAND_PMAGIC)
|
||||
channels_type |= CHANNELS_EMU;
|
||||
else if(magic == NAND_PMAGIC)
|
||||
channels_type |= CHANNELS_REAL;
|
||||
}
|
||||
}
|
||||
}
|
||||
m_cfg.setString(PLUGIN_DOMAIN, "enabled_plugins", enabledMagics);
|
||||
|
@ -80,6 +80,8 @@ void CMenu::_sourceFlow()
|
||||
m_plugin.SetEnablePlugin(pos, 1); // force disable all
|
||||
enabledPluginsCount = 0;
|
||||
string enabledMagics;
|
||||
int channels_type = m_cfg.getInt(CHANNEL_DOMAIN, "channels_type");
|
||||
u8 first = 1;
|
||||
for(i = 0; i < magicNums.size(); i++)
|
||||
{
|
||||
u8 pos = m_plugin.GetPluginPosition(strtoul(magicNums[i].c_str(), NULL, 16));
|
||||
@ -91,8 +93,22 @@ void CMenu::_sourceFlow()
|
||||
enabledMagics = magicNums[i];
|
||||
else
|
||||
enabledMagics.append(',' + magicNums[i]);
|
||||
string magic = sfmt("%08x", m_plugin.GetPluginMagic(pos));
|
||||
if(magic == ENAND_PMAGIC || magic == NAND_PMAGIC)
|
||||
{
|
||||
if(first)
|
||||
{
|
||||
first--;
|
||||
channels_type = 0;
|
||||
}
|
||||
if(magic == ENAND_PMAGIC)
|
||||
channels_type |= CHANNELS_EMU;
|
||||
else if(magic == NAND_PMAGIC)
|
||||
channels_type |= CHANNELS_REAL;
|
||||
}
|
||||
}
|
||||
}
|
||||
m_cfg.setInt(CHANNEL_DOMAIN, "channels_type", channels_type);
|
||||
m_cfg.setString(PLUGIN_DOMAIN, "enabled_plugins", enabledMagics);
|
||||
m_current_view = COVERFLOW_PLUGIN;
|
||||
}
|
||||
@ -500,6 +516,8 @@ bool CMenu::_Source()
|
||||
m_plugin.SetEnablePlugin(pos, 1); // force disable all
|
||||
enabledPluginsCount = 0;
|
||||
string enabledMagics;
|
||||
int channels_type = m_cfg.getInt(CHANNEL_DOMAIN, "channels_type");
|
||||
u8 first = 1;
|
||||
for(i = 0; i < magicNums.size(); i++)
|
||||
{
|
||||
u8 pos = m_plugin.GetPluginPosition(strtoul(magicNums[i].c_str(), NULL, 16));
|
||||
@ -511,8 +529,22 @@ bool CMenu::_Source()
|
||||
enabledMagics = magicNums[i];
|
||||
else
|
||||
enabledMagics.append(',' + magicNums[i]);
|
||||
string magic = sfmt("%08x", m_plugin.GetPluginMagic(pos));
|
||||
if(magic == ENAND_PMAGIC || magic == NAND_PMAGIC)
|
||||
{
|
||||
if(first)
|
||||
{
|
||||
first--;
|
||||
channels_type = 0;
|
||||
}
|
||||
if(magic == ENAND_PMAGIC)
|
||||
channels_type |= CHANNELS_EMU;
|
||||
else if(magic == NAND_PMAGIC)
|
||||
channels_type |= CHANNELS_REAL;
|
||||
}
|
||||
}
|
||||
}
|
||||
m_cfg.setInt(CHANNEL_DOMAIN, "channels_type", channels_type);
|
||||
m_cfg.setString(PLUGIN_DOMAIN, "enabled_plugins", enabledMagics);
|
||||
m_current_view = COVERFLOW_PLUGIN;
|
||||
_setSrcOptions();
|
||||
|
Loading…
Reference in New Issue
Block a user