mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-22 19:29:18 +01:00
*Fixed the CodeDump caused by Rev 290 when no language path or file was on the bootDevice
This commit is contained in:
parent
4930c698d3
commit
be11958dec
@ -1678,11 +1678,15 @@ void CFG_Load(void) {
|
||||
languagefile = strrchr(Settings.language_path, '/')+1;
|
||||
int mainlangid = -1;
|
||||
int i;
|
||||
if(strcmp("notset", Settings.language_path)) {
|
||||
for (i=0; map_language[i].name != NULL; i++) {
|
||||
if (strstr(languagefile, map_language[i].name) != NULL) {
|
||||
mainlangid = i - 1; // - 1 because CONF_LANG starts at 0
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mainlangid = 2;
|
||||
}
|
||||
GetLanguageToLangCode(&mainlangid, Settings.db_language);
|
||||
|
||||
@ -1701,7 +1705,6 @@ void CFG_Load(void) {
|
||||
//cfg_parsefile(pathname, &title_set);
|
||||
|
||||
// cfg_parsearg(argc, argv);
|
||||
|
||||
// if GUI language is set to default Settings.language_path needs to remain "notset" (if the detected setting was kept detection wouldn't work next time)
|
||||
if (langisdefault)
|
||||
sprintf(Settings.language_path, "notset");
|
||||
|
Loading…
Reference in New Issue
Block a user