mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-22 19:29:18 +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]);
|
sprintf(URLFile,"%sJA/%s",server3d,missingFiles[i]);
|
||||||
break;
|
break;
|
||||||
case 'K':
|
case 'K':
|
||||||
case 'T':
|
//case 'T':
|
||||||
case 'Q':
|
//case 'Q':
|
||||||
sprintf(URLFile,"%sKO/%s",server3d,missingFiles[i]);
|
sprintf(URLFile,"%sKO/%s",server3d,missingFiles[i]);
|
||||||
break;
|
break;
|
||||||
|
case 'P':
|
||||||
case 'D':
|
case 'D':
|
||||||
case 'F':
|
case 'F':
|
||||||
case 'I':
|
case 'I':
|
||||||
case 'P':
|
case 'S':
|
||||||
|
case 'H':
|
||||||
case 'X':
|
case 'X':
|
||||||
case 'Y':
|
case 'Y':
|
||||||
sprintf(URLFile,"%s%s/%s",server3d,sysLanguage,missingFiles[i]);
|
sprintf(URLFile,"%s%s/%s",server3d,sysLanguage,missingFiles[i]);
|
||||||
@ -1998,14 +2000,16 @@ ProgressDownloadWindow(int choice2)
|
|||||||
sprintf(URLFile,"%sJA/%s",serverDisc,missingFiles[i]);
|
sprintf(URLFile,"%sJA/%s",serverDisc,missingFiles[i]);
|
||||||
break;
|
break;
|
||||||
case 'K':
|
case 'K':
|
||||||
case 'T':
|
//case 'T':
|
||||||
case 'Q':
|
//case 'Q':
|
||||||
sprintf(URLFile,"%sKO/%s",serverDisc,missingFiles[i]);
|
sprintf(URLFile,"%sKO/%s",serverDisc,missingFiles[i]);
|
||||||
break;
|
break;
|
||||||
|
case 'P':
|
||||||
case 'D':
|
case 'D':
|
||||||
case 'F':
|
case 'F':
|
||||||
case 'I':
|
case 'I':
|
||||||
case 'P':
|
case 'S':
|
||||||
|
case 'H':
|
||||||
case 'X':
|
case 'X':
|
||||||
case 'Y':
|
case 'Y':
|
||||||
sprintf(URLFile,"%s%s/%s",serverDisc,sysLanguage,missingFiles[i]);
|
sprintf(URLFile,"%s%s/%s",serverDisc,sysLanguage,missingFiles[i]);
|
||||||
@ -2044,14 +2048,16 @@ ProgressDownloadWindow(int choice2)
|
|||||||
sprintf(URLFile,"%sJA/%s",server2d,missingFiles[i]);
|
sprintf(URLFile,"%sJA/%s",server2d,missingFiles[i]);
|
||||||
break;
|
break;
|
||||||
case 'K':
|
case 'K':
|
||||||
case 'T':
|
//case 'T':
|
||||||
case 'Q':
|
//case 'Q':
|
||||||
sprintf(URLFile,"%sKO/%s",server2d,missingFiles[i]);
|
sprintf(URLFile,"%sKO/%s",server2d,missingFiles[i]);
|
||||||
break;
|
break;
|
||||||
|
case 'P':
|
||||||
case 'D':
|
case 'D':
|
||||||
case 'F':
|
case 'F':
|
||||||
case 'I':
|
case 'I':
|
||||||
case 'P':
|
case 'S':
|
||||||
|
case 'H':
|
||||||
case 'X':
|
case 'X':
|
||||||
case 'Y':
|
case 'Y':
|
||||||
sprintf(URLFile,"%s%s/%s",server2d,sysLanguage,missingFiles[i]);
|
sprintf(URLFile,"%s%s/%s",server2d,sysLanguage,missingFiles[i]);
|
||||||
@ -2952,9 +2958,11 @@ void GetLanguageToLangCode(char *langcode) {
|
|||||||
case CONF_LANG_DUTCH:
|
case CONF_LANG_DUTCH:
|
||||||
sprintf(langcode, "NL");
|
sprintf(langcode, "NL");
|
||||||
break;
|
break;
|
||||||
/* case CONF_LANG_PORTUGUESE:
|
/*
|
||||||
|
case CONF_LANG_PORTUGUESE:
|
||||||
sprintf(langcode, "PO");
|
sprintf(langcode, "PO");
|
||||||
break;*/
|
break;
|
||||||
|
*/
|
||||||
case CONF_LANG_SIMP_CHINESE:
|
case CONF_LANG_SIMP_CHINESE:
|
||||||
sprintf(langcode, "EN"); // default to EN for chinese
|
sprintf(langcode, "EN"); // default to EN for chinese
|
||||||
break;
|
break;
|
||||||
|
@ -16,7 +16,7 @@ Load game information from XML - Lustar
|
|||||||
/* config */
|
/* config */
|
||||||
static bool xmldebug = false;
|
static bool xmldebug = false;
|
||||||
static char xmlcfg_filename[100] = "wiitdb.zip";
|
static char xmlcfg_filename[100] = "wiitdb.zip";
|
||||||
|
static int xmlmaxsize = 1572864;
|
||||||
|
|
||||||
extern struct SSettings Settings; // for loader GX
|
extern struct SSettings Settings; // for loader GX
|
||||||
|
|
||||||
@ -150,6 +150,12 @@ bool OpenXMLFile(char *filename)
|
|||||||
unz_file_info zipfileinfo;
|
unz_file_info zipfileinfo;
|
||||||
unzGetCurrentFileInfo(unzfile, &zipfileinfo, NULL, 0, NULL, 0, NULL, 0);
|
unzGetCurrentFileInfo(unzfile, &zipfileinfo, NULL, 0, NULL, 0, NULL, 0);
|
||||||
int zipfilebuffersize = zipfileinfo.uncompressed_size;
|
int zipfilebuffersize = zipfileinfo.uncompressed_size;
|
||||||
|
if (zipfilebuffersize >= xmlmaxsize) {
|
||||||
|
unzCloseCurrentFile(unzfile);
|
||||||
|
unzClose(unzfile);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
char * zipfilebuffer = malloc(zipfilebuffersize);
|
char * zipfilebuffer = malloc(zipfilebuffersize);
|
||||||
memset(zipfilebuffer, 0, zipfilebuffersize);
|
memset(zipfilebuffer, 0, zipfilebuffersize);
|
||||||
if (zipfilebuffer == NULL) {
|
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] == 'J') strlcpy(gameinfo.region,"NTSC-J",sizeof(gameinfo.region));
|
||||||
if (gameid[3] == 'K') strlcpy(gameinfo.region,"NTSC-K",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] == '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] == '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] == 'F') strlcpy(gameinfo.region,"PAL",sizeof(gameinfo.region));
|
||||||
if (gameid[3] == 'S') 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] == '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
|
// free memory
|
||||||
|
Loading…
Reference in New Issue
Block a user