mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Rename Config::languageIni to Config::sLanguageIni for consistency.
This commit is contained in:
parent
283599c7f1
commit
e6d85cfb39
@ -67,7 +67,7 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename)
|
||||
// TODO: Be smart about same language, different country
|
||||
}
|
||||
|
||||
general->Get("Language", &languageIni, defaultLangRegion.c_str());
|
||||
general->Get("Language", &sLanguageIni, defaultLangRegion.c_str());
|
||||
general->Get("NumWorkerThreads", &iNumWorkerThreads, cpu_info.num_cores);
|
||||
general->Get("EnableCheats", &bEnableCheats, false);
|
||||
general->Get("ScreenshotsAsPNG", &bScreenshotsAsPNG, false);
|
||||
@ -274,7 +274,7 @@ void Config::Save() {
|
||||
general->Set("WindowWidth", iWindowWidth);
|
||||
general->Set("WindowHeight", iWindowHeight);
|
||||
#endif
|
||||
general->Set("Language", languageIni);
|
||||
general->Set("Language", sLanguageIni);
|
||||
general->Set("NumWorkerThreads", iNumWorkerThreads);
|
||||
general->Set("EnableCheats", bEnableCheats);
|
||||
general->Set("ScreenshotsAsPNG", bScreenshotsAsPNG);
|
||||
|
@ -57,7 +57,7 @@ public:
|
||||
bool bAutoSaveSymbolMap;
|
||||
std::string sReportHost;
|
||||
std::vector<std::string> recentIsos;
|
||||
std::string languageIni;
|
||||
std::string sLanguageIni;
|
||||
|
||||
// GFX
|
||||
bool bSoftwareRendering;
|
||||
|
@ -509,12 +509,12 @@ UI::EventReturn DeveloperToolsScreen::OnRunCPUTests(UI::EventParams &e) {
|
||||
}
|
||||
|
||||
UI::EventReturn DeveloperToolsScreen::OnSaveLanguageIni(UI::EventParams &e) {
|
||||
i18nrepo.SaveIni(g_Config.languageIni);
|
||||
i18nrepo.SaveIni(g_Config.sLanguageIni);
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
UI::EventReturn DeveloperToolsScreen::OnLoadLanguageIni(UI::EventParams &e) {
|
||||
i18nrepo.LoadIni(g_Config.languageIni);
|
||||
i18nrepo.LoadIni(g_Config.sLanguageIni);
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
|
@ -230,7 +230,7 @@ NewLanguageScreen::NewLanguageScreen(const std::string &title) : ListPopupScreen
|
||||
buttonTitle = langValuesMapping[code].first;
|
||||
}
|
||||
}
|
||||
if (g_Config.languageIni == code)
|
||||
if (g_Config.sLanguageIni == code)
|
||||
selected = counter;
|
||||
listing.push_back(buttonTitle);
|
||||
counter++;
|
||||
@ -242,7 +242,7 @@ NewLanguageScreen::NewLanguageScreen(const std::string &title) : ListPopupScreen
|
||||
void NewLanguageScreen::OnCompleted(DialogResult result) {
|
||||
if (result != DR_OK)
|
||||
return;
|
||||
std::string oldLang = g_Config.languageIni;
|
||||
std::string oldLang = g_Config.sLanguageIni;
|
||||
|
||||
std::string iniFile = langs_[listView_->GetSelected()].name;
|
||||
|
||||
@ -254,9 +254,9 @@ void NewLanguageScreen::OnCompleted(DialogResult result) {
|
||||
if (code.empty())
|
||||
return;
|
||||
|
||||
g_Config.languageIni = code;
|
||||
g_Config.sLanguageIni = code;
|
||||
|
||||
if (i18nrepo.LoadIni(g_Config.languageIni)) {
|
||||
if (i18nrepo.LoadIni(g_Config.sLanguageIni)) {
|
||||
// Dunno what else to do here.
|
||||
if (langValuesMapping.find(code) == langValuesMapping.end()) {
|
||||
// Fallback to English
|
||||
@ -266,7 +266,7 @@ void NewLanguageScreen::OnCompleted(DialogResult result) {
|
||||
}
|
||||
RecreateViews();
|
||||
} else {
|
||||
g_Config.languageIni = oldLang;
|
||||
g_Config.sLanguageIni = oldLang;
|
||||
}
|
||||
}
|
||||
|
||||
@ -342,7 +342,7 @@ void CreditsScreen::CreateViews() {
|
||||
#ifndef GOLD
|
||||
root_->Add(new Button(c->T("Buy Gold"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 10, false)))->OnClick.Handle(this, &CreditsScreen::OnSupport);
|
||||
#endif
|
||||
if(g_Config.languageIni == "zh_CN" ||g_Config.languageIni == "zh_TW") {
|
||||
if(g_Config.sLanguageIni == "zh_CN" ||g_Config.sLanguageIni == "zh_TW") {
|
||||
root_->Add(new Button(c->T("PPSSPP Chinese Forum"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 84, false)))->OnClick.Handle(this, &CreditsScreen::OnChineseForum);
|
||||
root_->Add(new Button(c->T("PPSSPP Forums"), new AnchorLayoutParams(260, 64, 10, NONE, NONE, 154, false)))->OnClick.Handle(this, &CreditsScreen::OnForums);
|
||||
root_->Add(new Button("www.ppsspp.org", new AnchorLayoutParams(260, 64, 10, NONE, NONE, 228, false)))->OnClick.Handle(this, &CreditsScreen::OnPPSSPPOrg);
|
||||
|
@ -371,7 +371,7 @@ void NativeInit(int argc, const char *argv[],
|
||||
g_Config.memCardDirectory = "MemStick/";
|
||||
#endif
|
||||
|
||||
i18nrepo.LoadIni(g_Config.languageIni);
|
||||
i18nrepo.LoadIni(g_Config.sLanguageIni);
|
||||
I18NCategory *d = GetI18NCategory("DesktopUI");
|
||||
// Note to translators: do not translate this/add this to PPSSPP-lang's files.
|
||||
// It's intended to be custom for every user.
|
||||
|
@ -383,7 +383,7 @@ namespace MainWindow
|
||||
AppendMenu(helpMenu, MF_STRING | MF_BYCOMMAND, ID_HELP_OPENWEBSITE, visitMainWebsite.c_str());
|
||||
AppendMenu(helpMenu, MF_STRING | MF_BYCOMMAND, ID_HELP_OPENFORUM, visitForum.c_str());
|
||||
// Repeat the process for other languages, if necessary.
|
||||
if(g_Config.languageIni == "zh_CN" || g_Config.languageIni == "zh_TW") {
|
||||
if(g_Config.sLanguageIni == "zh_CN" || g_Config.sLanguageIni == "zh_TW") {
|
||||
const std::wstring visitChineseForum = ConvertUTF8ToWString(des->T("PPSSPP Chinese Forum"));
|
||||
AppendMenu(helpMenu, MF_STRING | MF_BYCOMMAND, ID_HELP_CHINESE_FORUM, visitChineseForum.c_str());
|
||||
}
|
||||
@ -419,10 +419,10 @@ namespace MainWindow
|
||||
|
||||
checkedStatus = MF_UNCHECKED;
|
||||
|
||||
if(g_Config.languageIni == i->first) {
|
||||
if(g_Config.sLanguageIni == i->first) {
|
||||
checkedStatus = MF_CHECKED;
|
||||
// Update iLanguage so games boot with the proper language, if available.
|
||||
g_Config.iLanguage = langValuesMap[g_Config.languageIni].second;
|
||||
g_Config.iLanguage = langValuesMap[g_Config.sLanguageIni].second;
|
||||
}
|
||||
|
||||
AppendMenu(langMenu, MF_STRING | MF_BYPOSITION | checkedStatus, item++, fullLanguageName.c_str());
|
||||
@ -1341,15 +1341,15 @@ namespace MainWindow
|
||||
// ID_LANGUAGE_BASE and an additional 1 off it.
|
||||
u32 index = (wParam - ID_LANGUAGE_BASE - 1);
|
||||
if(index >= 0 && index < countryCodes.size()) {
|
||||
std::string oldLang = g_Config.languageIni;
|
||||
g_Config.languageIni = countryCodes[index];
|
||||
std::string oldLang = g_Config.sLanguageIni;
|
||||
g_Config.sLanguageIni = countryCodes[index];
|
||||
|
||||
if(i18nrepo.LoadIni(g_Config.languageIni)) {
|
||||
if(i18nrepo.LoadIni(g_Config.sLanguageIni)) {
|
||||
NativeMessageReceived("language", "");
|
||||
PostMessage(hwndMain, WM_USER_UPDATE_UI, 0, 0);
|
||||
}
|
||||
else
|
||||
g_Config.languageIni = oldLang;
|
||||
g_Config.sLanguageIni = oldLang;
|
||||
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user