Fix title definition loading

This commit is contained in:
J-D-K 2021-09-01 14:52:58 -04:00
parent 34c1bc50b4
commit ed77864455
2 changed files with 20 additions and 1 deletions

View File

@ -273,6 +273,20 @@ static void loadTitleDefsLegacy()
}
}
//Oops
static void loadTitleDefs()
{
if(fs::fileExists(titleDefPath))
{
fs::dataFile getPaths(titleDefPath);
while(getPaths.readNextLine(true))
{
uint64_t tid = strtoul(getPaths.getName().c_str(), NULL, 16);
pathDefs[tid] = getPaths.getNextValueStr();
}
}
}
void cfg::loadConfig()
{
loadWorkDirLegacy();
@ -280,6 +294,7 @@ void cfg::loadConfig()
loadFavoritesLegacy();
loadBlacklistLegacy();
loadTitleDefsLegacy();
loadTitleDefs();
if(fs::fileExists(cfgPath))
{

View File

@ -182,7 +182,11 @@ void ui::loadTrans()
file = "romfs:/lang/";
switch(data::sysLang)
{
//I removed these for now. Old translation files are incompatible and will cause crashes.
case SetLanguage_ZHTW:
case SetLanguage_ZHHANT:
file += "zh-TW.txt";
break;
default:
ui::initStrings();
return;