From 4b3120fccf226680f6c3e3944d6ff79d03be4033 Mon Sep 17 00:00:00 2001 From: dimok321 <15055714+dimok789@users.noreply.github.com> Date: Tue, 11 Jan 2011 17:52:30 +0000 Subject: [PATCH] *A new icon.png (icon2.png) (thanks Black.Pearl for it) *Changed cover download logic on fail of cover download (that's what lustar wanted :P) *Added "OTHER" directory search on wiitdb for covers/discarts with custom gameids *Language files update for v2.0 and current revision --- HBC/META.XML | 4 +- HBC/icon2.png | Bin 0 -> 7899 bytes Languages/dutch.lang | 186 +++++++++++++++---------------- Languages/italian.lang | 14 +-- Languages/japanese.lang | 2 +- Languages/schinese.lang | 12 +- Languages/tchinese.lang | 4 +- source/ZipFile.h | 2 +- source/network/CoverDownload.cpp | 134 ++++++++++++++-------- source/prompts/DiscBrowser.cpp | 47 +------- source/prompts/gameinfo.cpp | 2 - source/usbloader/usbstorage2.c | 2 +- 12 files changed, 204 insertions(+), 205 deletions(-) create mode 100644 HBC/icon2.png diff --git a/HBC/META.XML b/HBC/META.XML index 2bf90177..23fdac8d 100644 --- a/HBC/META.XML +++ b/HBC/META.XML @@ -2,8 +2,8 @@ USB Loader GX USB Loader GX Team - 2.0 r1039 - 201101091722 + 2.0 r1040 + 201101091911 Loads games from USB-devices USB Loader GX is a libwiigui based USB iso loader with a wii-like GUI. You can install games to your HDDs and boot them with shorter loading times. diff --git a/HBC/icon2.png b/HBC/icon2.png new file mode 100644 index 0000000000000000000000000000000000000000..81499ae8018da9d7b97bef1d5f3a2f97be05be5f GIT binary patch literal 7899 zcmV<19wgz3P)&hGzyE)KLfG#JekX7jEEen#91$E9>=UdN zEEIey=p|?(_@m%eGR;5U;5VE2KN2(*EE8nM$H!k=yLRn;A0MCc`Sa(O2L}f~+_r7o zo&EdwUzh6_1-XKQf-M4n!4$zzK{v%1e-`{g@ZB#kr*8@VN$_uq(TLyM8IEJ9v0hhg z{zLF9!OKqi<8%H=&`e1-e%4fDaI9|`Qt(wZ-XAN$Q}=w6iT|3Qk04HPdD*gM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SjWfAb90NP-WgcpWv5&XQ!^ds zup3HL$@oT975s}A@j+fv8&I_EFjeVT*0>dkg?~$oLmEuwtV=MCe7mIdDH-V3f2T+9 zeoyJ~&dTQ6pbpARP~WGkV|Cwrp-vKe#zVcVPQh%Y4w%%&Q@XMr4ylKmtbF^|YW(9* zzqjA3qjKwMJLQ}HP~TNn``b#~by2yAH@ & MissingFilesList) { if(!url || !writepath) @@ -35,7 +121,6 @@ static int CoverDownloadWithProgress(const char * url, const char * progressTitl return -1; } - char downloadURL[512]; char progressMsg[255]; int FilesSkipped = MissingFilesList.size(); ProgressSetAbortCallback(AbortCallback); @@ -52,50 +137,9 @@ static int CoverDownloadWithProgress(const char * url, const char * progressTitl if(MissingFilesList[i].size() < 4) continue; - //Creates URL depending from which Country the game is - switch (MissingFilesList[i][3]) - { - case 'J': - sprintf(downloadURL, "%sJA/%s.png", url, MissingFilesList[i].c_str()); - break; - case 'W': - sprintf(downloadURL, "%sZH/%s.png", url, MissingFilesList[i].c_str()); - break; - case 'K': - sprintf(downloadURL, "%sKO/%s.png", url, MissingFilesList[i].c_str()); - break; - case 'P': - case 'D': - case 'F': - case 'I': - case 'S': - case 'H': - case 'U': - case 'X': - case 'Y': - case 'Z': - sprintf(downloadURL, "%s%s/%s.png", url, Settings.db_language, MissingFilesList[i].c_str()); - break; - case 'E': - sprintf(downloadURL, "%sUS/%s.png", url, MissingFilesList[i].c_str()); - break; - } - - struct block file = downloadfile(downloadURL); - if(!VALID_IMAGE(file)) - { - if(file.data) - free(file.data); - - snprintf(downloadURL, sizeof(downloadURL), "%sEN/%s.png", url, MissingFilesList[i].c_str()); - file = downloadfile(downloadURL); - if(!VALID_IMAGE(file)) - { - if(file.data) - free(file.data); - continue; - } - } + struct block file = DownloadImage(url, MissingFilesList[i].c_str()); + if(!file.data) + continue; char imgPath[200]; snprintf(imgPath, sizeof(imgPath), "%s/%s.png", writepath, MissingFilesList[i].c_str()); diff --git a/source/prompts/DiscBrowser.cpp b/source/prompts/DiscBrowser.cpp index 19360e4a..e48d27a1 100644 --- a/source/prompts/DiscBrowser.cpp +++ b/source/prompts/DiscBrowser.cpp @@ -9,7 +9,7 @@ #include "libwiigui/gui.h" #include "libwiigui/gui_customoptionbrowser.h" #include "prompts/PromptWindows.h" -#include "menu.h" +#include "menu/menus.h" #include "usbloader/disc.h" #include "usbloader/fstfile.h" #include "usbloader/wdvd.h" @@ -24,15 +24,6 @@ #include "memory/memory.h" #include "gecko.h" -/*** Extern functions ***/ -extern void ResumeGui(); -extern void HaltGui(); - -/*** Extern variables ***/ -extern GuiWindow * mainWindow; -extern u8 shutdown; -extern u8 reset; - /******************************************************************************** *Disk Browser *********************************************************************************/ @@ -284,26 +275,6 @@ int autoSelectDol(const char *id, bool force) int autoSelectDolMenu(const char *id, bool force) { - /* - char id4[10]; - sprintf(id4,"%c%c%c%c",id[0],id[1],id[2],id[3]); - - switch (CheckForSave(id4)) { - case 0: - WindowPrompt(tr("NO save"),0,tr("OK")); - break; - case 1: - WindowPrompt(tr("save"),0,tr("OK")); - break; - default: - char test[10]; - sprintf(test,"%d",CheckForSave(id4)); - WindowPrompt(test,0,tr("OK")); - break; - } - return -1; - */ - //Indiana Jones and the Staff of Kings (Fate of Atlantis) if (strcmp(id, "RJ8E64") == 0) { @@ -367,13 +338,6 @@ int autoSelectDolMenu(const char *id, bool force) //Metroid Prime Trilogy if (strcmp(id, "R3ME01") == 0) { - //do not use any alt dol if there is no save game in the nand - /* - if (CheckForSave(id4)==0 && force) { - WindowPrompt(0,tr("You need to start this game one time to create a save file, then exit and start it again."),tr("OK")); - return -1; - } - */ int choice = WindowPrompt(tr( "Select a DOL" ), 0, "Metroid Prime", "Metroid Prime 2", "Metroid Prime 3", tr( "Cancel" )); switch (choice) { @@ -394,12 +358,6 @@ int autoSelectDolMenu(const char *id, bool force) } if (strcmp(id, "R3MP01") == 0) { - /* - if (CheckForSave(id4)==0 && force) { - WindowPrompt(0,tr("You need to start this game one time to create a save file, then exit and start it again."),tr("OK")); - return -1; - } - */ int choice = WindowPrompt(tr( "Select a DOL" ), 0, "Metroid Prime", "Metroid Prime 2", "Metroid Prime 3", tr( "Cancel" )); switch (choice) { @@ -481,7 +439,7 @@ u8 DiscMount(struct discHdr * header) int ret; HaltGui(); - u8 *tmpBuff = (u8 *) malloc(0x60); + u8 tmpBuff[0x60]; memcpy(tmpBuff, g_diskID, 0x60); // Make a backup of the first 96 bytes at 0x80000000 Disc_SetUSB(NULL); @@ -499,7 +457,6 @@ u8 DiscMount(struct discHdr * header) memcpy(header, g_diskID, 0x60); memcpy(g_diskID, tmpBuff, 0x60); // Put the backup back, or games won't load - free(tmpBuff); ResumeGui(); diff --git a/source/prompts/gameinfo.cpp b/source/prompts/gameinfo.cpp index d23729a6..88b271f7 100644 --- a/source/prompts/gameinfo.cpp +++ b/source/prompts/gameinfo.cpp @@ -981,7 +981,6 @@ bool save_gamelist(int txt) // save gamelist f = fopen(tmp, "w"); if (!f) { - sleep(1); mainWindow->SetState(STATE_DEFAULT); return false; } @@ -1024,7 +1023,6 @@ bool save_gamelist(int txt) // save gamelist } else { - fprintf(f, "\"ID\",\"Size(GB)\",\"Name\"\n"); for (i = 0; i < gameList.size(); i++) diff --git a/source/usbloader/usbstorage2.c b/source/usbloader/usbstorage2.c index 19027a7a..e174980e 100644 --- a/source/usbloader/usbstorage2.c +++ b/source/usbloader/usbstorage2.c @@ -93,7 +93,7 @@ s32 USBStorage2_Init(void) if (ret < 0) goto err; /* Get device capacity */ - if (USBStorage2_GetCapacity(§or_size) == 0 || sector_size != 512) + if (USBStorage2_GetCapacity(§or_size) == 0) { ret = IPC_ENOENT; goto err;