- channels type fix.

This commit is contained in:
Fledge68 2019-10-28 13:43:13 -05:00
parent 24ce6136e4
commit 7e4011138f
3 changed files with 2 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 MiB

After

Width:  |  Height:  |  Size: 3.6 MiB

View File

@ -2450,7 +2450,7 @@ bool CMenu::_loadChannelList(void)
bool CMenu::_loadPluginList()
{
bool updateCache = m_cfg.getBool(PLUGIN_DOMAIN, "update_cache");
int channels_type = m_cfg.getInt(CHANNEL_DOMAIN, "channels_type", CHANNELS_REAL);
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)
{

View File

@ -65,7 +65,7 @@ void CMenu::_showConfig3(void)
i = min(max(0, m_cfg.getInt("GENERAL", "game_language", 0)), (int)ARRAY_SIZE(CMenu::_languages) - 1);
m_btnMgr.setText(m_config3LblLanguage, _t(CMenu::_languages[i].id, CMenu::_languages[i].text));
i = m_cfg.getInt(CHANNEL_DOMAIN, "channels_type", CHANNELS_REAL) - 1;
i = min(max(1, m_cfg.getInt(CHANNEL_DOMAIN, "channels_type", CHANNELS_REAL)), (int)ARRAY_SIZE(CMenu::_ChannelsType)) - 1;
m_btnMgr.setText(m_config3LblChannelsTypeVal, _t(CMenu::_ChannelsType[i].id, CMenu::_ChannelsType[i].text));
}