- now when wiiflow's language is changed it will auto reload cache so game titles will also be changed.

This commit is contained in:
Fledge68 2018-12-09 15:16:54 -06:00
parent 1b95372276
commit 8d0436c177
4 changed files with 14 additions and 6 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 MiB

After

Width:  |  Height:  |  Size: 3.3 MiB

View File

@ -339,8 +339,11 @@ bool CMenu::init()
case CONF_LANG_KOREAN: case CONF_LANG_KOREAN:
defLang = "korean"; defLang = "korean";
break; break;
case CONF_LANG_ENGLISH:
defLang = "english";
break;
} }
if (CONF_GetArea() == CONF_AREA_BRA) if(CONF_GetArea() == CONF_AREA_BRA)
defLang = "brazilian"; defLang = "brazilian";
m_curLanguage = m_cfg.getString("GENERAL", "language", defLang); m_curLanguage = m_cfg.getString("GENERAL", "language", defLang);
@ -1910,7 +1913,8 @@ void CMenu::_drawBg(void)
void CMenu::_updateText(void) void CMenu::_updateText(void)
{ {
_textSource(); if(m_use_source)
_textSource();
_textPluginSettings(); _textPluginSettings();
_textCategorySettings(); _textCategorySettings();
_textCheatSettings(); _textCheatSettings();

View File

@ -124,7 +124,7 @@ int CMenu::_configAdv(void)
break; break;
} }
} }
bool lang_changed = false; string prevLanguage = languages_available[available_pos];
_showConfigAdv(); _showConfigAdv();
while(!m_exit) while(!m_exit)
@ -161,7 +161,6 @@ int CMenu::_configAdv(void)
} }
else else
m_cfg.setString("GENERAL", "language", m_curLanguage.c_str()); m_cfg.setString("GENERAL", "language", m_curLanguage.c_str());
lang_changed = true;
_updateText(); _updateText();
_showConfigAdv(); _showConfigAdv();
} }
@ -175,8 +174,13 @@ int CMenu::_configAdv(void)
} }
} }
_hideConfigAdv(); _hideConfigAdv();
if(lang_changed) if(m_curLanguage != prevLanguage)
{
m_cacheList.Init(m_settingsDir.c_str(), m_loc.getString(m_curLanguage, "gametdb_code", "EN").c_str());
fsop_deleteFolder(m_listCacheDir.c_str());// delete cache lists folder and remake it so all lists update.
fsop_MakeFolder(m_listCacheDir.c_str());
m_refreshGameList = true; m_refreshGameList = true;
}
return change; return change;
} }

View File

@ -160,7 +160,7 @@ void CMenu::_showCF(bool refreshList)
_cacheCovers(); _cacheCovers();
_stop_pThread(); _stop_pThread();
m_btnMgr.setText(m_wbfsLblDialog, _t("dlmsg14", L"Done.")); m_btnMgr.setText(m_wbfsLblDialog, _t("dlmsg14", L"Done."));
u8 pause = 240; u8 pause = 150;
while(!m_exit) while(!m_exit)
{ {
_mainLoopCommon(); _mainLoopCommon();