mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-25 20:56:53 +01:00
Fixed WiiTDB update for people who own more than 240 games. The custom URL now uses the full game ID to account for the recent proliferation of game IDs. Changed user agent so that the loader identifies itself as "USBLoaderGX (revision number)". Canceling the txt/csv export prompt will now close it without saving any file. Possible fix for issue 991 (endless rumble when changing theme path).
This commit is contained in:
parent
f270f828da
commit
f4758ca9c4
File diff suppressed because one or more lines are too long
2
gui.pnps
2
gui.pnps
@ -1 +1 @@
|
||||
<pd><ViewState><e p="gui\source\mload" x="false"></e><e p="gui\source\settings" x="false"></e><e p="gui\source\images" x="false"></e><e p="gui\source\prompts" x="false"></e><e p="gui\source\banner" x="false"></e><e p="gui\source\cheats" x="false"></e><e p="gui\source\network" x="false"></e><e p="gui\source\unzip" x="false"></e><e p="gui\source\usbloader" x="false"></e><e p="gui\source\xml" x="false"></e><e p="gui\source\fonts" x="false"></e><e p="gui\source\ramdisc" x="false"></e><e p="gui\source\sounds" x="false"></e><e p="gui\source\wad" x="false"></e><e p="gui" x="true"></e><e p="gui\source\homebrewboot" x="false"></e><e p="gui\source\language" x="false"></e><e p="gui\source" x="true"></e><e p="gui\source\libwbfs" x="false"></e><e p="gui\source\libwiigui" x="true"></e><e p="gui\source\patches" x="false"></e></ViewState></pd>
|
||||
<pd><ViewState><e p="gui\source\mload" x="false"></e><e p="gui\source\settings" x="false"></e><e p="gui\source\images" x="false"></e><e p="gui\source\prompts" x="true"></e><e p="gui\source\banner" x="false"></e><e p="gui\source\cheats" x="false"></e><e p="gui\source\network" x="true"></e><e p="gui\source\unzip" x="false"></e><e p="gui\source\usbloader" x="false"></e><e p="gui\source\xml" x="false"></e><e p="gui\source\fonts" x="false"></e><e p="gui\source\ramdisc" x="false"></e><e p="gui\source\sounds" x="false"></e><e p="gui\source\wad" x="false"></e><e p="gui" x="true"></e><e p="gui\source\homebrewboot" x="false"></e><e p="gui\source\language" x="false"></e><e p="gui\source" x="true"></e><e p="gui\source\libwbfs" x="false"></e><e p="gui\source\libwiigui" x="true"></e><e p="gui\source\patches" x="false"></e></ViewState></pd>
|
@ -945,20 +945,18 @@ int MenuDiscList() {
|
||||
}
|
||||
|
||||
} else if (gamecntBtn.GetState() == STATE_CLICKED && mountMethod!=3) {
|
||||
|
||||
gamecntBtn.ResetState();
|
||||
char linebuf[150];
|
||||
snprintf(linebuf, sizeof(linebuf), "%s %sGameList ?",tr("Save Game List to"), Settings.update_path);
|
||||
|
||||
choice = WindowPrompt(0,linebuf, "txt","csv",tr("Back"));
|
||||
|
||||
if (save_gamelist(choice-1))
|
||||
WindowPrompt(0,tr("Saved"), tr("OK"));
|
||||
else
|
||||
WindowPrompt(tr("Error"),tr("Could not save."), tr("OK"));
|
||||
choice = WindowPrompt(0,linebuf,"TXT","CSV",tr("Back"));
|
||||
if (choice) {
|
||||
if (save_gamelist(choice-1))
|
||||
WindowPrompt(0,tr("Saved"),tr("OK"));
|
||||
else
|
||||
WindowPrompt(tr("Error"),tr("Could not save."),tr("OK"));
|
||||
}
|
||||
menu = MENU_DISCLIST;
|
||||
break;
|
||||
|
||||
//gamecntBtn.ResetState();
|
||||
|
||||
} else if (homeBtn.GetState() == STATE_CLICKED) {
|
||||
s32 thetimeofbg = bgMusic->GetPlayTime();
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "http.h"
|
||||
|
||||
#include "../svnrev.h"
|
||||
|
||||
extern char incommingIP[50];
|
||||
|
||||
@ -10,7 +10,8 @@ extern char incommingIP[50];
|
||||
const struct block emptyblock = {0, NULL};
|
||||
|
||||
//The maximum amount of bytes to send per net_write() call
|
||||
#define NET_BUFFER_SIZE 1024
|
||||
//#define NET_BUFFER_SIZE 1024
|
||||
#define NET_BUFFER_SIZE 3600
|
||||
|
||||
// Write our message to the server
|
||||
static s32 send_message(s32 server, char *msg) {
|
||||
@ -173,9 +174,9 @@ struct block downloadfile(const char *url) {
|
||||
}
|
||||
|
||||
//Form a nice request header to send to the webserver
|
||||
char* headerformat = "GET %s HTTP/1.0\r\nHost: %s\r\nUser-Agent: WiiEarthh 1.0\r\n\r\n";;
|
||||
char* headerformat = "GET %s HTTP/1.0\r\nHost: %s\r\nUser-Agent: USBLoaderGX r%s\r\n\r\n";;
|
||||
char header[strlen(headerformat) + strlen(domain) + strlen(path)];
|
||||
sprintf(header, headerformat, path, domain);
|
||||
sprintf(header, headerformat, path, domain, GetRev());
|
||||
|
||||
//Do the request and get the response
|
||||
send_message(connection, header);
|
||||
|
@ -2488,16 +2488,18 @@ int ProgressUpdateWindow() {
|
||||
}
|
||||
|
||||
//make the URL to get XML based on our games
|
||||
char XMLurl[2040];
|
||||
char XMLurl[3540]; // NET_BUFFER_SIZE in http.c needs to be set to size of XMLurl + 40
|
||||
char filename[10];
|
||||
__Menu_GetEntries(1);
|
||||
snprintf(XMLurl,sizeof(XMLurl),"http://wiitdb.com/wiitdb.zip?LANG=%s?ID=",Settings.db_language);
|
||||
snprintf(XMLurl,sizeof(XMLurl),"http://wiitdb.com/wiitdb.zip?LANG=%s&ID=",Settings.db_language);
|
||||
unsigned int i;
|
||||
for (i = 0; i < gameCnt ; i++) {
|
||||
struct discHdr* header = &gameList[i];
|
||||
if (i<500) {
|
||||
snprintf(filename,sizeof(filename),"%c%c%c", header->id[1], header->id[2], header->id[3]);
|
||||
strncat(XMLurl, filename,3 );
|
||||
//snprintf(filename,sizeof(filename),"%c%c%c", header->id[1], header->id[2], header->id[3]);
|
||||
//strncat(XMLurl,filename,3);
|
||||
snprintf(filename,sizeof(filename),"%c%c%c%c%c%c", header->id[0], header->id[1], header->id[2],header->id[3], header->id[4], header->id[5]);
|
||||
strncat(XMLurl,filename,6);
|
||||
if ((i!=gameCnt-1)&&(i<500))
|
||||
strncat(XMLurl, ",",1);
|
||||
}
|
||||
|
@ -1085,16 +1085,18 @@ bool save_XML_URL() { // save xml url as as txt file for people without wifi
|
||||
//make sure that all games are added to the gamelist
|
||||
__Menu_GetEntries(1);
|
||||
|
||||
char XMLurl[2040];
|
||||
char XMLurl[3540];
|
||||
char filename[10];
|
||||
|
||||
snprintf(XMLurl,sizeof(XMLurl),"http://wiitdb.com/wiitdb.zip?LANG=%s?ID=", Settings.db_language);
|
||||
snprintf(XMLurl,sizeof(XMLurl),"http://wiitdb.com/wiitdb.zip?LANG=%s&ID=", Settings.db_language);
|
||||
unsigned int i;
|
||||
for (i = 0; i < gameCnt ; i++) {
|
||||
struct discHdr* header = &gameList[i];
|
||||
if (i<500) {
|
||||
snprintf(filename,sizeof(filename),"%c%c%c", header->id[1], header->id[2], header->id[3]);
|
||||
strncat(XMLurl, filename,3 );
|
||||
//snprintf(filename,sizeof(filename),"%c%c%c", header->id[1], header->id[2], header->id[3]);
|
||||
//strncat(XMLurl, filename,3 );
|
||||
snprintf(filename,sizeof(filename),"%c%c%c%c%c%c", header->id[0], header->id[1], header->id[2],header->id[3], header->id[4], header->id[5]);
|
||||
strncat(XMLurl,filename,6);
|
||||
if ((i!=gameCnt-1)&&(i<500))
|
||||
strncat(XMLurl, ",",1);
|
||||
}
|
||||
|
@ -1353,8 +1353,10 @@ int MenuSettings() {
|
||||
cfg_save_global();
|
||||
}
|
||||
mainWindow->Remove(bgImg);
|
||||
HaltGui();
|
||||
CFG_Load();
|
||||
CFG_LoadGlobal();
|
||||
ResumeGui();
|
||||
menu = MENU_SETTINGS;
|
||||
#ifdef HW_RVL
|
||||
snprintf(imgPath, sizeof(imgPath), "%splayer1_point.png", CFG.theme_path);
|
||||
|
Loading…
Reference in New Issue
Block a user