mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-22 19:29:18 +01:00
Simplified Chinese/Traditional Chinese should now be detected if the GUI language is set to "default". Simplified Chinese/Traditional Chinese is now supported for titles,synopsis and artwork (http://wiitdb.com/Game/RSPW01).
This commit is contained in:
parent
c25b7cf470
commit
324358e7e1
@ -1061,16 +1061,15 @@ int MenuDiscList() {
|
|||||||
case 'E':
|
case 'E':
|
||||||
sprintf(gameregion,"NTSC U");
|
sprintf(gameregion,"NTSC U");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'J':
|
case 'J':
|
||||||
case 'W':
|
|
||||||
sprintf(gameregion,"NTSC J");
|
sprintf(gameregion,"NTSC J");
|
||||||
break;
|
break;
|
||||||
|
case 'W':
|
||||||
|
sprintf(gameregion,"NTSC T");
|
||||||
|
break;
|
||||||
case 'K':
|
case 'K':
|
||||||
sprintf(gameregion,"NTSC K");
|
sprintf(gameregion,"NTSC K");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'P':
|
case 'P':
|
||||||
case 'D':
|
case 'D':
|
||||||
case 'F':
|
case 'F':
|
||||||
|
@ -2023,12 +2023,12 @@ ProgressDownloadWindow(int choice2) {
|
|||||||
//Creates URL depending from which Country the game is
|
//Creates URL depending from which Country the game is
|
||||||
switch (missingFiles[i][3]) {
|
switch (missingFiles[i][3]) {
|
||||||
case 'J':
|
case 'J':
|
||||||
case 'W':
|
|
||||||
sprintf(URLFile,"%sJA/%s",server3d,missingFiles[i]);
|
sprintf(URLFile,"%sJA/%s",server3d,missingFiles[i]);
|
||||||
break;
|
break;
|
||||||
|
case 'W':
|
||||||
|
sprintf(URLFile,"%sZH/%s",server3d,missingFiles[i]);
|
||||||
|
break;
|
||||||
case 'K':
|
case 'K':
|
||||||
//case 'T':
|
|
||||||
//case 'Q':
|
|
||||||
sprintf(URLFile,"%sKO/%s",server3d,missingFiles[i]);
|
sprintf(URLFile,"%sKO/%s",server3d,missingFiles[i]);
|
||||||
break;
|
break;
|
||||||
case 'P':
|
case 'P':
|
||||||
@ -2068,7 +2068,6 @@ ProgressDownloadWindow(int choice2) {
|
|||||||
//Creates URL depending from which Country the game is
|
//Creates URL depending from which Country the game is
|
||||||
switch (missingFiles[i][3]) {
|
switch (missingFiles[i][3]) {
|
||||||
case 'J':
|
case 'J':
|
||||||
case 'W':
|
|
||||||
if(Settings.discart == 0) {
|
if(Settings.discart == 0) {
|
||||||
sprintf(URLFile,"%sJA/%s",serverDisc,missingFiles[i]);
|
sprintf(URLFile,"%sJA/%s",serverDisc,missingFiles[i]);
|
||||||
} else if(Settings.discart == 1) {
|
} else if(Settings.discart == 1) {
|
||||||
@ -2083,6 +2082,21 @@ ProgressDownloadWindow(int choice2) {
|
|||||||
sprintf(URLFile,"%sJA/%s",serverDisc,missingFiles[i]);
|
sprintf(URLFile,"%sJA/%s",serverDisc,missingFiles[i]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 'W':
|
||||||
|
if(Settings.discart == 0) {
|
||||||
|
sprintf(URLFile,"%sZH/%s",serverDisc,missingFiles[i]);
|
||||||
|
} else if(Settings.discart == 1) {
|
||||||
|
sprintf(URLFile,"%sZH/%s",serverDiscCustom,missingFiles[i]);
|
||||||
|
} else if(Settings.discart == 2 && tries == 0) {
|
||||||
|
sprintf(URLFile,"%sZH/%s",serverDisc,missingFiles[i]);
|
||||||
|
} else if(Settings.discart == 2 && tries == 1) {
|
||||||
|
sprintf(URLFile,"%sZH/%s",serverDiscCustom,missingFiles[i]);
|
||||||
|
} else if(Settings.discart == 3 && tries == 0) {
|
||||||
|
sprintf(URLFile,"%sZH/%s",serverDiscCustom,missingFiles[i]);
|
||||||
|
} else if(Settings.discart == 3 && tries == 1) {
|
||||||
|
sprintf(URLFile,"%sZH/%s",serverDisc,missingFiles[i]);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case 'K':
|
case 'K':
|
||||||
if(Settings.discart == 0) {
|
if(Settings.discart == 0) {
|
||||||
sprintf(URLFile,"%sKO/%s",serverDisc,missingFiles[i]);
|
sprintf(URLFile,"%sKO/%s",serverDisc,missingFiles[i]);
|
||||||
@ -2169,12 +2183,12 @@ ProgressDownloadWindow(int choice2) {
|
|||||||
//Creates URL depending from which Country the game is
|
//Creates URL depending from which Country the game is
|
||||||
switch (missingFiles[i][3]) {
|
switch (missingFiles[i][3]) {
|
||||||
case 'J':
|
case 'J':
|
||||||
|
sprintf(URLFile,"%sJA/%s",server3d,missingFiles[i]);
|
||||||
|
break;
|
||||||
case 'W':
|
case 'W':
|
||||||
sprintf(URLFile,"%sJA/%s",server2d,missingFiles[i]);
|
sprintf(URLFile,"%sZH/%s",server3d,missingFiles[i]);
|
||||||
break;
|
break;
|
||||||
case 'K':
|
case 'K':
|
||||||
//case 'T':
|
|
||||||
//case 'Q':
|
|
||||||
sprintf(URLFile,"%sKO/%s",server2d,missingFiles[i]);
|
sprintf(URLFile,"%sKO/%s",server2d,missingFiles[i]);
|
||||||
break;
|
break;
|
||||||
case 'P':
|
case 'P':
|
||||||
@ -2234,6 +2248,50 @@ ProgressDownloadWindow(int choice2) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**Temporary redownloading 1st image because of a fucking corruption bug **/
|
||||||
|
|
||||||
|
char URLFile[100];
|
||||||
|
struct block file = downloadfile(URLFile);
|
||||||
|
if (choice2 == 2) {
|
||||||
|
while (tries<serverCnt3d) {
|
||||||
|
sprintf(URLFile,"%s%s",server3d,missingFiles[0]);
|
||||||
|
sprintf(imgPath,"%s%s", Settings.covers_path, missingFiles[0]);
|
||||||
|
file = downloadfile(URLFile);
|
||||||
|
if (!(file.size == 36864 || file.size <= 1024 || file.size <= 1174 || file.size == 7386 || file.size == 4446 || file.data == NULL))break;
|
||||||
|
tries++;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if (choice2 == 3) {
|
||||||
|
while (tries<serverCntDisc) {
|
||||||
|
sprintf(URLFile,"%s%s",serverDisc,missingFiles[0]);
|
||||||
|
sprintf(imgPath,"%s%s", Settings.disc_path, missingFiles[0]);
|
||||||
|
file = downloadfile(URLFile);
|
||||||
|
if (!(file.size == 36864 || file.size <= 1024 || file.size <= 1174 || file.size == 7386 || file.size == 4446 || file.data == NULL))break;
|
||||||
|
tries++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (choice2 == 1) {
|
||||||
|
while (tries<serverCnt2d) {
|
||||||
|
sprintf(URLFile,"%s%s",server2d,missingFiles[0]);
|
||||||
|
sprintf(imgPath,"%s%s", Settings.covers_path, missingFiles[0]);
|
||||||
|
file = downloadfile(URLFile);
|
||||||
|
if (!(file.size == 36864 || file.size <= 1024 || file.size <= 1174 || file.size == 7386 || file.size == 4446 || file.data == NULL))break;
|
||||||
|
tries++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (file.size == 36864 || file.size <= 1024 || file.size == 7386 || file.size <= 1174 || file.size == 4446 || file.data == NULL) {
|
||||||
|
} else {
|
||||||
|
if (file.data != NULL) {
|
||||||
|
// save png to sd card
|
||||||
|
FILE *pfile;
|
||||||
|
pfile = fopen(imgPath, "wb");
|
||||||
|
fwrite(file.data,1,file.size,pfile);
|
||||||
|
fclose (pfile);
|
||||||
|
free(file.data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
HaltGui();
|
HaltGui();
|
||||||
mainWindow->Remove(&promptWindow);
|
mainWindow->Remove(&promptWindow);
|
||||||
mainWindow->SetState(STATE_DEFAULT);
|
mainWindow->SetState(STATE_DEFAULT);
|
||||||
|
@ -95,8 +95,8 @@ struct TextMap map_language[] = {
|
|||||||
{ "spanish", CFG_LANG_SPANISH },
|
{ "spanish", CFG_LANG_SPANISH },
|
||||||
{ "italian", CFG_LANG_ITALIAN },
|
{ "italian", CFG_LANG_ITALIAN },
|
||||||
{ "dutch", CFG_LANG_DUTCH },
|
{ "dutch", CFG_LANG_DUTCH },
|
||||||
{ "s.chinese", CFG_LANG_S_CHINESE },
|
{ "schinese", CFG_LANG_S_CHINESE }, // without a dot between s and chinese to match the language filename "schinese.lang"
|
||||||
{ "t.chinese", CFG_LANG_T_CHINESE },
|
{ "tchinese", CFG_LANG_T_CHINESE },
|
||||||
{ "korean", CFG_LANG_KOREAN },
|
{ "korean", CFG_LANG_KOREAN },
|
||||||
{ NULL, -1 }
|
{ NULL, -1 }
|
||||||
};
|
};
|
||||||
@ -1770,10 +1770,10 @@ void GetLanguageToLangCode(int *langid, char *langcode) {
|
|||||||
sprintf(langcode, "NL");
|
sprintf(langcode, "NL");
|
||||||
break;
|
break;
|
||||||
case CONF_LANG_SIMP_CHINESE:
|
case CONF_LANG_SIMP_CHINESE:
|
||||||
sprintf(langcode, "EN"); // default to EN for chinese
|
sprintf(langcode, "ZHCN"); // People's Republic of China
|
||||||
break;
|
break;
|
||||||
case CONF_LANG_TRAD_CHINESE:
|
case CONF_LANG_TRAD_CHINESE:
|
||||||
sprintf(langcode, "EN"); // default to EN for chinese
|
sprintf(langcode, "ZHTW"); // Taiwan
|
||||||
break;
|
break;
|
||||||
case CONF_LANG_KOREAN:
|
case CONF_LANG_KOREAN:
|
||||||
sprintf(langcode, "KO");
|
sprintf(langcode, "KO");
|
||||||
|
@ -359,7 +359,7 @@ extern "C" {
|
|||||||
short error002;
|
short error002;
|
||||||
u8 titlesOverride; // db_titles
|
u8 titlesOverride; // db_titles
|
||||||
char db_url[200];
|
char db_url[200];
|
||||||
char db_language[100];
|
char db_language[20];
|
||||||
u8 db_JPtoEN;
|
u8 db_JPtoEN;
|
||||||
u8 gridRows;
|
u8 gridRows;
|
||||||
u8 autonetwork;
|
u8 autonetwork;
|
||||||
|
@ -39,7 +39,7 @@ static char langlist[11][22] = {{"Console Default"},
|
|||||||
{"Korean"}
|
{"Korean"}
|
||||||
};
|
};
|
||||||
|
|
||||||
static char langcodes[11][3] = {{""},
|
static char langcodes[11][5] = {{""},
|
||||||
{"JA"},
|
{"JA"},
|
||||||
{"EN"},
|
{"EN"},
|
||||||
{"DE"},
|
{"DE"},
|
||||||
@ -47,8 +47,8 @@ static char langcodes[11][3] = {{""},
|
|||||||
{"ES"},
|
{"ES"},
|
||||||
{"IT"},
|
{"IT"},
|
||||||
{"NL"},
|
{"NL"},
|
||||||
{"ZH"},
|
{"ZHCN"}, // People's Republic of China
|
||||||
{"ZH"},
|
{"ZHTW"}, // Taiwan
|
||||||
{"KO"}
|
{"KO"}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -204,10 +204,10 @@ char *GetLangSettingFromGame(char *gameid) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* convert language text into ISO 639 two-letter language code */
|
/* convert language text into ISO 639 two-letter language code (+ZHTW/ZHCN) */
|
||||||
char *ConvertLangTextToCode(char *languagetxt) {
|
char *ConvertLangTextToCode(char *languagetxt) {
|
||||||
// do not convert if languagetext seems to be a two-letter language code
|
// do not convert if languagetext seems to be a language code (can be 2 or 4 letters)
|
||||||
if (strlen(languagetxt) == 2)
|
if (strlen(languagetxt) <= 4)
|
||||||
return languagetxt;
|
return languagetxt;
|
||||||
int i;
|
int i;
|
||||||
for (i=0;i<=10;i++) {
|
for (i=0;i<=10;i++) {
|
||||||
|
@ -24,7 +24,7 @@ extern "C" {
|
|||||||
char synopsis[3000];
|
char synopsis[3000];
|
||||||
char title_EN[200];
|
char title_EN[200];
|
||||||
char synopsis_EN[3000];
|
char synopsis_EN[3000];
|
||||||
char locales[XML_ELEMMAX+1][3];
|
char locales[XML_ELEMMAX+1][5];
|
||||||
int localeCnt;
|
int localeCnt;
|
||||||
char developer[75];
|
char developer[75];
|
||||||
char publisher[75];
|
char publisher[75];
|
||||||
|
Loading…
Reference in New Issue
Block a user