mirror of
https://github.com/wiidev/usbloadergx.git
synced 2025-02-17 03:46:22 +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;
|
languagefile = strrchr(Settings.language_path, '/')+1;
|
||||||
int mainlangid = -1;
|
int mainlangid = -1;
|
||||||
int i;
|
int i;
|
||||||
|
if(strcmp("notset", Settings.language_path)) {
|
||||||
for (i=0; map_language[i].name != NULL; i++) {
|
for (i=0; map_language[i].name != NULL; i++) {
|
||||||
if (strstr(languagefile, map_language[i].name) != NULL) {
|
if (strstr(languagefile, map_language[i].name) != NULL) {
|
||||||
mainlangid = i - 1; // - 1 because CONF_LANG starts at 0
|
mainlangid = i - 1; // - 1 because CONF_LANG starts at 0
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
mainlangid = 2;
|
||||||
}
|
}
|
||||||
GetLanguageToLangCode(&mainlangid, Settings.db_language);
|
GetLanguageToLangCode(&mainlangid, Settings.db_language);
|
||||||
|
|
||||||
@ -1701,7 +1705,6 @@ void CFG_Load(void) {
|
|||||||
//cfg_parsefile(pathname, &title_set);
|
//cfg_parsefile(pathname, &title_set);
|
||||||
|
|
||||||
// cfg_parsearg(argc, argv);
|
// 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 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)
|
if (langisdefault)
|
||||||
sprintf(Settings.language_path, "notset");
|
sprintf(Settings.language_path, "notset");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user