-fix for issue #18 plugin view will properly remember last game played when using wii, gc, and channel plugins.

-fix for issue #17 default theme name no longer all caps.
-fix for issue #16 channels type setting default text fixed.
-fix for issue #15, #14, #13 - all settings are fixed to show yes, no , on, off correctly
-fixed unused parameter warning in sys.c when compiling
This commit is contained in:
Fledge68 2018-11-16 15:38:48 -06:00
parent ca7a6598fe
commit 6dca85ef85
8 changed files with 39 additions and 10 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 MiB

After

Width:  |  Height:  |  Size: 3.4 MiB

View File

@ -131,6 +131,8 @@ void Sys_Exit(void)
void __Sys_ResetCallback(u32 irq, void *ctx) void __Sys_ResetCallback(u32 irq, void *ctx)
{ {
(void)irq;// to remove unused parameter warning
(void)ctx;
reset = true; reset = true;
} }

View File

@ -2168,9 +2168,22 @@ void CMenu::_initCF(void)
if(!CoverFlow.empty()) if(!CoverFlow.empty())
{ {
bool path = false; bool path = false;
if((m_source_cnt > 1 && m_cfg.getInt(_domainFromView(), "current_item_type", 1) == TYPE_PLUGIN) || if((m_source_cnt > 1 && m_cfg.getInt("MULTI", "current_item_type", 1) == TYPE_PLUGIN) || m_sourceflow || m_current_view == COVERFLOW_HOMEBREW)
m_sourceflow || m_current_view == COVERFLOW_HOMEBREW || m_current_view == COVERFLOW_PLUGIN)
path = true; path = true;
if(m_current_view == COVERFLOW_PLUGIN && !m_sourceflow && m_source_cnt == 1)
{
switch(m_cfg.getInt(PLUGIN_DOMAIN, "current_item_type", TYPE_PLUGIN))
{
case TYPE_CHANNEL:
case TYPE_EMUCHANNEL:
case TYPE_GC_GAME:
case TYPE_WII_GAME:
path = false;
break;
default:
path = true;
}
}
if(!CoverFlow.findId(m_cfg.getString(_domainFromView(), "current_item").c_str(), true, path)) if(!CoverFlow.findId(m_cfg.getString(_domainFromView(), "current_item").c_str(), true, path))
CoverFlow.defaultLoad(); CoverFlow.defaultLoad();
CoverFlow.startCoverLoader(); CoverFlow.startCoverLoader();

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); 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)); m_btnMgr.setText(m_config3LblLanguage, _t(CMenu::_languages[i].id, CMenu::_languages[i].text));
i = m_cfg.getInt(CHANNEL_DOMAIN, "channels_type") - 1; i = m_cfg.getInt(CHANNEL_DOMAIN, "channels_type", CHANNELS_REAL) - 1;
m_btnMgr.setText(m_config3LblChannelsTypeVal, _t(CMenu::_ChannelsType[i].id, CMenu::_ChannelsType[i].text)); m_btnMgr.setText(m_config3LblChannelsTypeVal, _t(CMenu::_ChannelsType[i].id, CMenu::_ChannelsType[i].text));
} }

View File

@ -100,9 +100,9 @@ void CMenu::_showConfig7(int curPage)
m_btnMgr.setText(m_config7Lbl1, _t("cfg705", L"Show banner in game settings")); m_btnMgr.setText(m_config7Lbl1, _t("cfg705", L"Show banner in game settings"));
m_btnMgr.setText(m_config7Btn1, m_cfg.getBool("GENERAL", "banner_in_settings") ? _t("yes", L"Yes") : _t("no", L"No")); m_btnMgr.setText(m_config7Btn1, m_cfg.getBool("GENERAL", "banner_in_settings") ? _t("yes", L"Yes") : _t("no", L"No"));
m_btnMgr.setText(m_config7Lbl2, _t("cfg706", L"Enable fanart")); m_btnMgr.setText(m_config7Lbl2, _t("cfg706", L"Enable fanart"));
m_btnMgr.setText(m_config7Btn1, m_cfg.getBool("FANART", "enable_fanart") ? _t("yes", L"Yes") : _t("no", L"No")); m_btnMgr.setText(m_config7Btn2, m_cfg.getBool("FANART", "enable_fanart") ? _t("yes", L"Yes") : _t("no", L"No"));
m_btnMgr.setText(m_config7Lbl3, _t("cfg707", L"Fanart default loop")); m_btnMgr.setText(m_config7Lbl3, _t("cfg707", L"Fanart default loop"));
m_btnMgr.setText(m_config7Btn1, !m_cfg.getBool("FANART", "show_cover_after_animation") ? _t("yes", L"Yes") : _t("no", L"No")); m_btnMgr.setText(m_config7Btn3, !m_cfg.getBool("FANART", "show_cover_after_animation") ? _t("yes", L"Yes") : _t("no", L"No"));
m_btnMgr.setText(m_config7Lbl4, _t("cfg708", L"Fanart default ending delay")); m_btnMgr.setText(m_config7Lbl4, _t("cfg708", L"Fanart default ending delay"));
m_btnMgr.setText(m_config7Lbl4Val, wfmt(L"%i", m_cfg.getInt("FANART", "delay_after_animation", 200))); m_btnMgr.setText(m_config7Lbl4Val, wfmt(L"%i", m_cfg.getInt("FANART", "delay_after_animation", 200)));
} }
@ -220,7 +220,7 @@ int CMenu::_config7(int curPage)
else if(m_btnMgr.selected(m_config7Btn3)) else if(m_btnMgr.selected(m_config7Btn3))
{ {
m_cfg.setBool("GENERAL", "screensaver_disabled", !m_cfg.getBool("GENERAL", "screensaver_disabled")); m_cfg.setBool("GENERAL", "screensaver_disabled", !m_cfg.getBool("GENERAL", "screensaver_disabled"));
m_btnMgr.setText(m_config7Btn3, m_cfg.getBool("GENERAL", "screensaver_disabled") ? _t("on", L"On") : _t("off", L"Off")); m_btnMgr.setText(m_config7Btn3, !m_cfg.getBool("GENERAL", "screensaver_disabled") ? _t("on", L"On") : _t("off", L"Off"));
} }
else if(m_btnMgr.selected(m_config7Btn4P) || m_btnMgr.selected(m_config7Btn4M)) else if(m_btnMgr.selected(m_config7Btn4P) || m_btnMgr.selected(m_config7Btn4M))
{ {

View File

@ -92,7 +92,7 @@ static void listThemes(const char * path, vector<string> &themes)
closedir(d); closedir(d);
} }
if (!def) if (!def)
themes.push_back("DEFAULT"); themes.push_back("default");
sort(themes.begin(), themes.end()); sort(themes.begin(), themes.end());
} }

View File

@ -265,8 +265,23 @@ void CMenu::_setCurrentItem(const dir_discHdr *hdr)
{ {
const char *title = CoverFlow.getFilenameId(hdr, true);// with extension const char *title = CoverFlow.getFilenameId(hdr, true);// with extension
m_cfg.setString(_domainFromView(), "current_item", title); m_cfg.setString(_domainFromView(), "current_item", title);
if(m_current_view == COVERFLOW_PLUGIN && m_source_cnt == 1)
{
m_cfg.setInt(PLUGIN_DOMAIN, "current_item_type", hdr->type);
switch(hdr->type)
{
case TYPE_CHANNEL:
case TYPE_EMUCHANNEL:
case TYPE_GC_GAME:
case TYPE_WII_GAME:
m_cfg.setBool(PLUGIN_DOMAIN, "current_item_id", true);
break;
default:
m_cfg.setBool(PLUGIN_DOMAIN, "current_item_id", false);
}
}
if(m_source_cnt > 1) if(m_source_cnt > 1)
m_cfg.setInt(_domainFromView(), "current_item_type", hdr->type); m_cfg.setInt("MULTI", "current_item_type", hdr->type);
} }
void CMenu::_hideGame(bool instant) void CMenu::_hideGame(bool instant)

View File

@ -53,7 +53,6 @@ bool CMenu::_Home(void)
SetupInput(); SetupInput();
_showHome(); _showHome();
string prevTheme = m_cfg.getString("GENERAL", "theme", "default");
while(!m_exit) while(!m_exit)
{ {
/* battery gets refreshed in here... */ /* battery gets refreshed in here... */
@ -67,7 +66,7 @@ bool CMenu::_Home(void)
m_btnMgr.down(); m_btnMgr.down();
else if(BTN_1_PRESSED) else if(BTN_1_PRESSED)
{ {
m_theme.load(fmt("%s.ini", m_themeDataDir.c_str())); //m_theme.load(fmt("%s.ini", m_themeDataDir.c_str()));
m_theme.save(); m_theme.save();
_hideHome(); _hideHome();
error(_t("savedtheme", L"Theme config saved!")); error(_t("savedtheme", L"Theme config saved!"));