-(hopefully) fixed wrong titles displayed when updating gametdb which sometimes happens

-changed language detection for gametdb (still not complete)
This commit is contained in:
fix94.1 2012-01-28 22:50:00 +00:00
parent 1ea3f86dd1
commit 713d8f5616
2 changed files with 27 additions and 1 deletions

View File

@ -1000,6 +1000,10 @@ int CMenu::_gametdbDownloaderAsync()
// We don't need the zipfile anymore
remove(zippath.c_str());
// We should always remove the offsets file to make sure it's reloaded
string offsetspath = sfmt("%s/gametdb_offsets.bin", m_settingsDir.c_str());
remove(offsetspath.c_str());
// Update cache
m_gameList.SetLanguage(m_loc.getString(m_curLanguage, "gametdb_code", "EN").c_str());
UpdateCache();

View File

@ -174,7 +174,29 @@ int CMenu::main(void)
SetupInput();
MusicPlayer::Instance()->Play();
m_gameList.SetLanguage(m_loc.getString(m_curLanguage, "gametdb_code", "EN").c_str());
const char* lang;
switch (CONF_GetLanguage())
{
case CONF_LANG_GERMAN:
lang="DE";
break;
case CONF_LANG_FRENCH:
lang="FR";
break;
case CONF_LANG_SPANISH:
lang="ES";
break;
case CONF_LANG_ITALIAN:
lang="IT";
break;
case CONF_LANG_DUTCH:
lang="NL";
break;
default:
lang="EN";
break;
}
m_gameList.SetLanguage(lang);
_loadList();
_showMain();