diff --git a/Languages/danish.lang b/Languages/danish.lang
index 954127c9..f62b0530 100644
--- a/Languages/danish.lang
+++ b/Languages/danish.lang
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-07-12 07:20-0400\n"
+"POT-Creation-Date: 2009-07-14 16:35-0400\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
diff --git a/Languages/dutch.lang b/Languages/dutch.lang
index 8d102441..9919025e 100644
--- a/Languages/dutch.lang
+++ b/Languages/dutch.lang
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-07-12 07:20-0400\n"
+"POT-Creation-Date: 2009-07-14 16:35-0400\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
diff --git a/Languages/english.lang b/Languages/english.lang
index 91390759..6615fca5 100644
--- a/Languages/english.lang
+++ b/Languages/english.lang
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-07-12 07:20-0400\n"
+"POT-Creation-Date: 2009-07-14 16:35-0400\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
diff --git a/Languages/finnish.lang b/Languages/finnish.lang
index 82ef9127..d5905db9 100644
--- a/Languages/finnish.lang
+++ b/Languages/finnish.lang
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-07-12 07:20-0400\n"
+"POT-Creation-Date: 2009-07-14 16:35-0400\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
diff --git a/Languages/french.lang b/Languages/french.lang
index 45525dd1..0adacea2 100644
--- a/Languages/french.lang
+++ b/Languages/french.lang
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-07-12 07:20-0400\n"
+"POT-Creation-Date: 2009-07-14 16:35-0400\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
diff --git a/Languages/german.lang b/Languages/german.lang
index aa44c392..7813e84e 100644
--- a/Languages/german.lang
+++ b/Languages/german.lang
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-07-12 07:20-0400\n"
+"POT-Creation-Date: 2009-07-14 16:35-0400\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
diff --git a/Languages/italian.lang b/Languages/italian.lang
index 2f3f72e7..3899e422 100644
--- a/Languages/italian.lang
+++ b/Languages/italian.lang
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-07-12 07:20-0400\n"
+"POT-Creation-Date: 2009-07-14 16:35-0400\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
diff --git a/Languages/japanese.lang b/Languages/japanese.lang
index 2557baf9..ecb475ca 100644
--- a/Languages/japanese.lang
+++ b/Languages/japanese.lang
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-07-12 07:20-0400\n"
+"POT-Creation-Date: 2009-07-14 16:35-0400\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
diff --git a/Languages/korean.lang b/Languages/korean.lang
index 56e25b76..085163f1 100644
--- a/Languages/korean.lang
+++ b/Languages/korean.lang
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-07-12 07:20-0400\n"
+"POT-Creation-Date: 2009-07-14 16:35-0400\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
diff --git a/Languages/norwegian.lang b/Languages/norwegian.lang
index 3feb24ef..ef752499 100644
--- a/Languages/norwegian.lang
+++ b/Languages/norwegian.lang
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-07-12 07:20-0400\n"
+"POT-Creation-Date: 2009-07-14 16:35-0400\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
diff --git a/Languages/portuguese_br.lang b/Languages/portuguese_br.lang
index d1dfca03..31e71338 100644
--- a/Languages/portuguese_br.lang
+++ b/Languages/portuguese_br.lang
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-07-12 07:20-0400\n"
+"POT-Creation-Date: 2009-07-14 16:35-0400\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
diff --git a/Languages/portuguese_pt.lang b/Languages/portuguese_pt.lang
index 0754a2fb..fdcb26da 100644
--- a/Languages/portuguese_pt.lang
+++ b/Languages/portuguese_pt.lang
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-07-12 07:20-0400\n"
+"POT-Creation-Date: 2009-07-14 16:35-0400\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
diff --git a/Languages/russian.lang b/Languages/russian.lang
index d4a00a65..ba01b5f3 100644
--- a/Languages/russian.lang
+++ b/Languages/russian.lang
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-07-12 07:20-0400\n"
+"POT-Creation-Date: 2009-07-14 16:35-0400\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
diff --git a/Languages/schinese.lang b/Languages/schinese.lang
index 7cb87cb8..2534d8b5 100644
--- a/Languages/schinese.lang
+++ b/Languages/schinese.lang
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-07-12 07:20-0400\n"
+"POT-Creation-Date: 2009-07-14 16:35-0400\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
diff --git a/Languages/spanish.lang b/Languages/spanish.lang
index 10586d47..bb413d74 100644
--- a/Languages/spanish.lang
+++ b/Languages/spanish.lang
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-07-12 07:20-0400\n"
+"POT-Creation-Date: 2009-07-14 16:35-0400\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
diff --git a/Languages/swedish.lang b/Languages/swedish.lang
index dcd7e41d..e8eb1327 100644
--- a/Languages/swedish.lang
+++ b/Languages/swedish.lang
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-07-12 07:20-0400\n"
+"POT-Creation-Date: 2009-07-14 16:35-0400\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
diff --git a/Languages/tchinese.lang b/Languages/tchinese.lang
index 832adc81..2a45bc9e 100644
--- a/Languages/tchinese.lang
+++ b/Languages/tchinese.lang
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-07-12 07:20-0400\n"
+"POT-Creation-Date: 2009-07-14 16:35-0400\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
diff --git a/Languages/turkish.lang b/Languages/turkish.lang
index b503283b..134cd073 100644
--- a/Languages/turkish.lang
+++ b/Languages/turkish.lang
@@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: USB Loader GX\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-07-12 07:20-0400\n"
+"POT-Creation-Date: 2009-07-14 16:35-0400\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
diff --git a/gui.pnproj b/gui.pnproj
index fdbd730a..8619c386 100644
--- a/gui.pnproj
+++ b/gui.pnproj
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/gui.pnps b/gui.pnps
index a0b1534a..7b61cd7d 100644
--- a/gui.pnps
+++ b/gui.pnps
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/source/libwiigui/gui_text.cpp b/source/libwiigui/gui_text.cpp
index c6235d8a..619cba3c 100644
--- a/source/libwiigui/gui_text.cpp
+++ b/source/libwiigui/gui_text.cpp
@@ -294,8 +294,9 @@ void GuiText::Draw()
int linenum = 0;
int lastSpace = -1;
int lastSpaceIndex = -1;
- wchar_t * tmptext[20];
-
+ wchar_t * tmptext[55];
+
+ totalLines=0;
while(ch < strlen)
{
if(i == 0)
@@ -351,7 +352,7 @@ void GuiText::Draw()
i=0;
for(j=firstLine-1; j < numLines+firstLine-1; j++)
{
- if (jdrawText(this->GetLeft(), this->GetTop()+voffset+i*lineheight, tmptext[j], c, style);
i++;
}
diff --git a/source/network/networkops.cpp b/source/network/networkops.cpp
index 68b308a7..0dbcf0b6 100644
--- a/source/network/networkops.cpp
+++ b/source/network/networkops.cpp
@@ -216,6 +216,7 @@ int CheckUpdate()
}
if(revnumber > currentrev)
+ //if(revnumber > 1)//for testing updates
return revnumber;
else
return -1;
diff --git a/source/prompts/PromptWindows.cpp b/source/prompts/PromptWindows.cpp
index 569ee56c..41ac48a4 100644
--- a/source/prompts/PromptWindows.cpp
+++ b/source/prompts/PromptWindows.cpp
@@ -179,7 +179,7 @@ void WindowCredits()
//to be ready to be in a full channel
snprintf(svnTmp,sizeof(svnTmp), "%s", SVN_REV);
char SvnRev[30];
- snprintf(SvnRev,sizeof(SvnRev), "Rev%s IOS%u (Rev %u)", svnTmp, IOS_GetVersion(), IOS_GetRevision());
+ snprintf(SvnRev,sizeof(SvnRev), "Rev%sc IOS%u (Rev %u)", svnTmp, IOS_GetVersion(), IOS_GetRevision());
#endif
@@ -2364,11 +2364,27 @@ int ProgressUpdateWindow()
break;
}
}
+
+ //make the URL to get XML based on our games
+ char XMLurl[2010];
+ char filename[10];
+ strncat (XMLurl, "http://wiitdb.com/wiitdb.zip?ID=", 32);
+ unsigned int i;
+ for (i = 0; i < gameCnt ; i++)
+ {
+ struct discHdr* header = &gameList[i];
+ if (i<393){
+ snprintf (filename,sizeof(filename),"%c%c%c%c", header->id[0], header->id[1], header->id[2], header->id[3]);
+ strncat (XMLurl, filename, 4);
+ if ((i!=gameCnt-1)&&(i<392))
+ strncat (XMLurl, ",",1);
+ }
+ }
+
if(IsNetworkInit() && ret >= 0) {
int newrev = CheckUpdate();
-
if(newrev > 0) {
sprintf(msg, "Rev%i %s.", newrev, tr("available"));
@@ -2388,7 +2404,7 @@ int ProgressUpdateWindow()
u8 * blockbuffer = new unsigned char[BLOCKSIZE];
for (s32 i = 0; i < filesize; i += BLOCKSIZE) {
usleep(100);
- prTxt.SetTextf("%i%%", 100*i/filesize);
+ prTxt.SetTextf("%i%%", (100*i/filesize)+1);
if ((Settings.wsprompt == yes) && (CFG.widescreen)) {
progressbarImg.SetTile(80*i/filesize);
} else {
@@ -2448,7 +2464,7 @@ int ProgressUpdateWindow()
fclose(pfile);
free(file.data);
}
- file = downloadfile("http://wiitdb.com/wiitdb.zip");
+ file = downloadfile(XMLurl);
if(file.data != NULL){
sprintf(xmliconpath, "%swiitdb.zip", Settings.titlestxt_path);
pfile = fopen(xmliconpath, "wb");
@@ -2595,6 +2611,33 @@ int ProgressUpdateWindow()
failed = -1;
}
}
+
+ if(stat(Settings.titlestxt_path, &st) != 0) {
+ if(subfoldercreate(Settings.titlestxt_path) != 1) {
+ WindowPrompt(tr("Error !"),tr("Can't create directory"),tr("OK"));
+ ret = -1;
+ failed = -1;
+ }
+ }
+
+
+ //make the URL to get XML based on our games
+ char XMLurl[2010];
+ char filename[10];
+ strncat (XMLurl, "http://wiitdb.com/wiitdb.zip?ID=", 32);
+ unsigned int i;
+ for (i = 0; i < gameCnt ; i++)
+ {
+ struct discHdr* header = &gameList[i];
+ if (i<393){
+ snprintf (filename,sizeof(filename),"%c%c%c%c", header->id[0], header->id[1], header->id[2], header->id[3]);
+ strncat (XMLurl, filename, 4);
+ if ((i!=gameCnt-1)&&(i<392))
+ strncat (XMLurl, ",",1);
+ }
+
+ }
+
char dolpath[150];
// char dolpathsuccess[150];//use coverspath as a folder for the update wad so we dont make a new folder and have to delete it
@@ -2626,10 +2669,10 @@ int ProgressUpdateWindow()
int newrev = CheckUpdate();
if(newrev > 0) {
-
+ FILE * pfile;
sprintf(msg, "Rev%i %s.", newrev, tr("available"));
int choice = WindowPrompt(msg, 0, tr("Update"));
- if(choice == 1 || choice == 2) {
+ if(choice == 1) {
titleTxt.SetTextf("%s USB Loader GX", tr("Updating"));
msgTxt.SetPosition(0,100);
promptWindow.Append(&progressbarEmptyImg);
@@ -2637,9 +2680,19 @@ int ProgressUpdateWindow()
promptWindow.Append(&progressbarOutlineImg);
promptWindow.Append(&prTxt);
msgTxt.SetTextf("%s Rev%i wad.", tr("Downloading"), newrev);//download the wad but it is saved as a genaric file.
+
+ struct block file = downloadfile(XMLurl);
+ char xmliconpath[100];
+ if(file.data != NULL){
+ sprintf(xmliconpath, "%swiitdb.zip", Settings.titlestxt_path);
+ pfile = fopen(xmliconpath, "wb");
+ fwrite(file.data,1,file.size,pfile);
+ fclose(pfile);
+ free(file.data);
+
s32 filesize = download_request("http://www.techjawa.com/usbloadergx/ULNR.file");//for some reason it didn't download completely when saved as a wad.
if(filesize > 0) {
- FILE * pfile;
+
pfile = fopen(dolpath, "wb");//here we save the txt as a wad
u8 * blockbuffer = new unsigned char[BLOCKSIZE];
for (s32 i = 0; i < filesize; i += BLOCKSIZE) {