mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-04 18:45:05 +01:00
Added check to prevent the full wiitdb.zip from being loaded. If you have the file but don't see any info use the Update All feature or the custom URL from the .txt file mentioned previously.
This commit is contained in:
parent
7681565421
commit
f52b0c71a9
@ -1950,14 +1950,16 @@ ProgressDownloadWindow(int choice2)
|
||||
sprintf(URLFile,"%sJA/%s",server3d,missingFiles[i]);
|
||||
break;
|
||||
case 'K':
|
||||
case 'T':
|
||||
case 'Q':
|
||||
//case 'T':
|
||||
//case 'Q':
|
||||
sprintf(URLFile,"%sKO/%s",server3d,missingFiles[i]);
|
||||
break;
|
||||
case 'P':
|
||||
case 'D':
|
||||
case 'F':
|
||||
case 'I':
|
||||
case 'P':
|
||||
case 'S':
|
||||
case 'H':
|
||||
case 'X':
|
||||
case 'Y':
|
||||
sprintf(URLFile,"%s%s/%s",server3d,sysLanguage,missingFiles[i]);
|
||||
@ -1998,14 +2000,16 @@ ProgressDownloadWindow(int choice2)
|
||||
sprintf(URLFile,"%sJA/%s",serverDisc,missingFiles[i]);
|
||||
break;
|
||||
case 'K':
|
||||
case 'T':
|
||||
case 'Q':
|
||||
//case 'T':
|
||||
//case 'Q':
|
||||
sprintf(URLFile,"%sKO/%s",serverDisc,missingFiles[i]);
|
||||
break;
|
||||
case 'P':
|
||||
case 'D':
|
||||
case 'F':
|
||||
case 'I':
|
||||
case 'P':
|
||||
case 'S':
|
||||
case 'H':
|
||||
case 'X':
|
||||
case 'Y':
|
||||
sprintf(URLFile,"%s%s/%s",serverDisc,sysLanguage,missingFiles[i]);
|
||||
@ -2044,14 +2048,16 @@ ProgressDownloadWindow(int choice2)
|
||||
sprintf(URLFile,"%sJA/%s",server2d,missingFiles[i]);
|
||||
break;
|
||||
case 'K':
|
||||
case 'T':
|
||||
case 'Q':
|
||||
//case 'T':
|
||||
//case 'Q':
|
||||
sprintf(URLFile,"%sKO/%s",server2d,missingFiles[i]);
|
||||
break;
|
||||
case 'P':
|
||||
case 'D':
|
||||
case 'F':
|
||||
case 'I':
|
||||
case 'P':
|
||||
case 'S':
|
||||
case 'H':
|
||||
case 'X':
|
||||
case 'Y':
|
||||
sprintf(URLFile,"%s%s/%s",server2d,sysLanguage,missingFiles[i]);
|
||||
@ -2952,9 +2958,11 @@ void GetLanguageToLangCode(char *langcode) {
|
||||
case CONF_LANG_DUTCH:
|
||||
sprintf(langcode, "NL");
|
||||
break;
|
||||
/* case CONF_LANG_PORTUGUESE:
|
||||
/*
|
||||
case CONF_LANG_PORTUGUESE:
|
||||
sprintf(langcode, "PO");
|
||||
break;*/
|
||||
break;
|
||||
*/
|
||||
case CONF_LANG_SIMP_CHINESE:
|
||||
sprintf(langcode, "EN"); // default to EN for chinese
|
||||
break;
|
||||
|
@ -16,7 +16,7 @@ Load game information from XML - Lustar
|
||||
/* config */
|
||||
static bool xmldebug = false;
|
||||
static char xmlcfg_filename[100] = "wiitdb.zip";
|
||||
|
||||
static int xmlmaxsize = 1572864;
|
||||
|
||||
extern struct SSettings Settings; // for loader GX
|
||||
|
||||
@ -150,6 +150,12 @@ bool OpenXMLFile(char *filename)
|
||||
unz_file_info zipfileinfo;
|
||||
unzGetCurrentFileInfo(unzfile, &zipfileinfo, NULL, 0, NULL, 0, NULL, 0);
|
||||
int zipfilebuffersize = zipfileinfo.uncompressed_size;
|
||||
if (zipfilebuffersize >= xmlmaxsize) {
|
||||
unzCloseCurrentFile(unzfile);
|
||||
unzClose(unzfile);
|
||||
return false;
|
||||
}
|
||||
|
||||
char * zipfilebuffer = malloc(zipfilebuffersize);
|
||||
memset(zipfilebuffer, 0, zipfilebuffersize);
|
||||
if (zipfilebuffer == NULL) {
|
||||
@ -576,13 +582,13 @@ bool LoadGameInfoFromXML(char* gameid, char* langtxt)
|
||||
if (gameid[3] == 'J') strlcpy(gameinfo.region,"NTSC-J",sizeof(gameinfo.region));
|
||||
if (gameid[3] == 'K') strlcpy(gameinfo.region,"NTSC-K",sizeof(gameinfo.region));
|
||||
if (gameid[3] == 'P') strlcpy(gameinfo.region,"PAL",sizeof(gameinfo.region));
|
||||
if (gameid[3] == 'X') strlcpy(gameinfo.region,"PAL-X",sizeof(gameinfo.region));
|
||||
if (gameid[3] == 'X') strlcpy(gameinfo.region,"PAL",sizeof(gameinfo.region));
|
||||
if (gameid[3] == 'Y') strlcpy(gameinfo.region,"PAL",sizeof(gameinfo.region));
|
||||
if (gameid[3] == 'D') strlcpy(gameinfo.region,"PAL",sizeof(gameinfo.region));
|
||||
if (gameid[3] == 'G') strlcpy(gameinfo.region,"PAL",sizeof(gameinfo.region));
|
||||
if (gameid[3] == 'F') strlcpy(gameinfo.region,"PAL",sizeof(gameinfo.region));
|
||||
if (gameid[3] == 'S') strlcpy(gameinfo.region,"PAL",sizeof(gameinfo.region));
|
||||
if (gameid[3] == 'I') strlcpy(gameinfo.region,"PAL",sizeof(gameinfo.region));
|
||||
if (gameid[3] == 'N') strlcpy(gameinfo.region,"PAL",sizeof(gameinfo.region));
|
||||
if (gameid[3] == 'H') strlcpy(gameinfo.region,"PAL",sizeof(gameinfo.region));
|
||||
}
|
||||
|
||||
// free memory
|
||||
|
Loading…
Reference in New Issue
Block a user