Skip to content

Commit

Permalink
Fix title definition loading
Browse files Browse the repository at this point in the history
  • Loading branch information
J-D-K committed Sep 1, 2021
1 parent 34c1bc5 commit ed77864
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
15 changes: 15 additions & 0 deletions src/cfg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,28 @@ 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();
loadConfigLegacy();
loadFavoritesLegacy();
loadBlacklistLegacy();
loadTitleDefsLegacy();
loadTitleDefs();

if(fs::fileExists(cfgPath))
{
Expand Down
6 changes: 5 additions & 1 deletion src/ui/uistr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ed77864

Please sign in to comment.