From 08ce514727de63a1cf58114c0fbdb882cd2bb299 Mon Sep 17 00:00:00 2001 From: "lustar.mii" Date: Sun, 18 Oct 2009 21:23:54 +0000 Subject: [PATCH] Added a macron in case any particular title happens to require it. The network init prompt won't show up at all when network has already been initialized. Ocarina should work for people that still had the problem with recent revisions (it fixed it for me, but only when using SD, not SDHC). --- gui.pnproj | 2 +- source/fatmounter.c | 10 ++---- source/fatmounter.h | 1 - source/fonts/font.ttf | Bin 48364 -> 55620 bytes source/menu.cpp | 5 --- source/prompts/PromptWindows.cpp | 52 +++++++--------------------- source/prompts/gameinfo.cpp | 46 +++++++++++++----------- source/prompts/gameinfo.h | 1 + source/settings/Settings.cpp | 12 ------- source/settings/SettingsPrompts.cpp | 3 -- 10 files changed, 42 insertions(+), 90 deletions(-) diff --git a/gui.pnproj b/gui.pnproj index 474de74a..a67b85a7 100644 --- a/gui.pnproj +++ b/gui.pnproj @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/source/fatmounter.c b/source/fatmounter.c index 6c9a1ca2..a4e0b104 100644 --- a/source/fatmounter.c +++ b/source/fatmounter.c @@ -34,10 +34,6 @@ void USBDevice_deInit() { fatUnmount("USB:/"); } -int isSdInserted() { - return __io_sdhc.isInserted() || __io_wiisd.isInserted(); -} - int isInserted(const char *path) { if (!strncmp(path, "USB:", 4)) return 1; @@ -48,10 +44,10 @@ int SDCard_Init() { //closing all open Files write back the cache and then shutdown em! fatUnmount("SD:/"); //right now mounts first FAT-partition - if (fatMount("SD", &__io_sdhc, 0, CACHE, SDHC_SECTOR_SIZE)) + if (fatMount("SD", &__io_wiisd, 0, CACHE, SECTORS)) + return 1; + else if (fatMount("SD", &__io_sdhc, 0, CACHE, SDHC_SECTOR_SIZE)) return 1; - else if (fatMount("SD", &__io_wiisd, 0, CACHE, SECTORS)) - return 1; return -1; } diff --git a/source/fatmounter.h b/source/fatmounter.h index e35faf41..b53c52a8 100644 --- a/source/fatmounter.h +++ b/source/fatmounter.h @@ -7,7 +7,6 @@ extern "C" { int USBDevice_Init(); void USBDevice_deInit(); - int isSdInserted(); int isInserted(const char *path); int SDCard_Init(); void SDCard_deInit(); diff --git a/source/fonts/font.ttf b/source/fonts/font.ttf index d4c461ca284c77bb2f6ac20c9cb73dea322765ef..01ce58166c4c97ca7ed556833ac8ecd30a40823c 100644 GIT binary patch delta 8439 zcmcgy39MYzc|LdM?%TQhojd#TX5MPv<9T`SIkqw0!3GQl7urHFiw)Gqu5m3ANG?*U zv{4JKI#o(RA_+x%ZlV|G4np4UGNMHtgQ9bKebH-ufo{ z2tQcr0xHZzC&m4n9)&^preDH4{JPrdk;QqS1 zu%Ujf{1(~ zN5Rm(_rQ@m@0;Ivim{iU2gB}TNAEjv+wRIn#$K@@WN_^GoyWfWm3MxRv1vklQg~02 zc75aieP8%2-|#Dzl_8k17p$dJe4hQ?9}hQ6nezBqpKTl7B4tzW37+@Zai-A?v0^NO zbT~lll%=1P225eYZ%F$kw)~;=R5>rb%iuQlo&?(c|4;eFD);Q!bMe-v*Z=*M{|ScA z6y71k((-qde^zpG=`Rfvjw&gN3@U+CjYtK_ilB1`^f@Bj#(hl%A7)L~uu>H<8yeWk zij0#|NiL}}mZfr8E-M%s4ok9J#sK9sDKZX8ZK+hI6LEy+lB|@mD$FWt;3gFig|o6O zX=b^wZZvC}Qo=Ejup75YCm@j=Ar`0<9f(b<%*x;v`f*mifVdDKW^%>HmO?JDf>G85 zVnrZU6wTCd2zmHVASN!M8-|p19lKZq7PbqI!Y+W&N;x40e8B)G;2KCo0>=V|s;GcV zyOM4d+;p1=lHnFXqYsEL!`~x0_|S2O5L*r*R)v2^n1%yg*K+a*1-dx72r)Lnple{1 zbq#`4iZy0MvvjZlepv+&r3Ce=dJeH{7_b>21T0}57)20tsQx(MyrjUNkWaTtWnCaf z=FuKFB*T#l>qfJ#t8j}TVK=ytKH!2Jl3O5F(e0S+5@NsukvQETI+xfZc{!bop6LU! z!C=5l6|5a6u<)EA%vI?NGAc7 zb3?#DI*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Og-Q?&SSb{>g{JKmHXS7y zKQz;1+1-#tW7HVd8M7F!agHpGB}UyJwmHK{B+cRs8O$(#=)x8=c6upb^i^@ba}CEa@u%vY3CM+tbyk3js__5jGR>3YqWH>^H*UPKGXj z{Vg2CZStknHUMD=x4p3_`7DxeN`fJ20O=H+DwYri-)D+Jj>5OthOAh?#AM=i#jo-% z8JS7g<4LDN(&%Q0tY9dB6f1FEn;)dOYtQ<7vvu90V}&Xl4GSE`9Q`yHK%>aM{1 zs9?@gm#Ec3*Tp<)ff%{CHHE@IiYd+H4 z()_c_zbno$TnT63+?<~q;l{Wt+?+O3Td8f)uIwJ&J*`vg9J&r&e|1y!)tdC0>Y9<7 z%lb^cTYpEtT)U;Vqc&zpH*^>-87AL4ZaifiH$FAxnc7W$)3E81Y05NjR+;VQA@ddU ztvzl&n{Vgq+W8^=96!m&`DF`hDX?@}Zdl8$N37$vX4?tdoc)CTd0k80Tzy`BsQy9& z-*B&C$zgC@bxb?v9e+2z+<3Fe?#y*^RO!?Y0U0ie}cG;)_EE%L*svZtFQozH!wssWlZ(c!omQR*iMJYPCyb8BxFA&Kva+GetSelectedOption(); offset = gameCarousel->GetOffset(); } - //if(isSdInserted()) { if (isInserted(bootDevice)) { HaltGui(); // to fix endless rumble when clicking on the SD icon when rumble is disabled because rumble is set to on in Global_Default() CFG_Load(); @@ -1074,7 +1073,6 @@ int MenuDiscList() { } else if (DownloadBtn.GetState() == STATE_CLICKED) { - //if(isSdInserted()) { if (isInserted(bootDevice)) { choice = WindowPrompt(tr("Cover Download"), 0, tr("Normal Covers"), tr("3D Covers"), tr("Disc Images"), tr("Back")); // ask for download choice if (choice != 0) { @@ -1133,7 +1131,6 @@ int MenuDiscList() { else if (favoriteBtn.GetState() == STATE_CLICKED) { Settings.fave=!Settings.fave; - //if(isSdInserted()) { if (isInserted(bootDevice)) { cfg_save_global(); } @@ -1228,7 +1225,6 @@ int MenuDiscList() { else if (abcBtn.GetState() == STATE_CLICKED) { if (Settings.sort != all) { Settings.sort=all; - //if(isSdInserted()) { if (isInserted(bootDevice)) { cfg_save_global(); } @@ -1243,7 +1239,6 @@ int MenuDiscList() { else if (countBtn.GetState() == STATE_CLICKED) { if (Settings.sort != pcount) { Settings.sort=pcount; - //if(isSdInserted()) { if (isInserted(bootDevice)) { cfg_save_global(); } diff --git a/source/prompts/PromptWindows.cpp b/source/prompts/PromptWindows.cpp index 254e7eb8..7fa8ffa5 100644 --- a/source/prompts/PromptWindows.cpp +++ b/source/prompts/PromptWindows.cpp @@ -18,6 +18,7 @@ #include "network/networkops.h" #include "network/http.h" #include "prompts/PromptWindows.h" +#include "prompts/gameinfo.h" #include "mload/mload.h" #include "fatmounter.h" #include "listfiles.h" @@ -1380,7 +1381,6 @@ int GameWindowPrompt() { promptWindow.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50); } else if (btnFavorite1.GetState() == STATE_CLICKED) {//switch favorite - //if(isSdInserted()) { if (isInserted(bootDevice)) { SetFavorite(&btnFavorite1, &btnFavorite2, &btnFavorite3, &btnFavorite4, &btnFavorite5, header->id, 1); SetFavoriteImages(&btnFavoriteImg1, &btnFavoriteImg2, &btnFavoriteImg3, &btnFavoriteImg4, &btnFavoriteImg5, &imgFavorite, &imgNotFavorite); @@ -1388,7 +1388,6 @@ int GameWindowPrompt() { btnFavorite1.ResetState(); } else if (btnFavorite2.GetState() == STATE_CLICKED) {//switch favorite - //if(isSdInserted()) { if (isInserted(bootDevice)) { SetFavorite(&btnFavorite1, &btnFavorite2, &btnFavorite3, &btnFavorite4, &btnFavorite5, header->id, 2); SetFavoriteImages(&btnFavoriteImg1, &btnFavoriteImg2, &btnFavoriteImg3, &btnFavoriteImg4, &btnFavoriteImg5, &imgFavorite, &imgNotFavorite); @@ -1396,7 +1395,6 @@ int GameWindowPrompt() { btnFavorite2.ResetState(); } else if (btnFavorite3.GetState() == STATE_CLICKED) {//switch favorite - //if(isSdInserted()) { if (isInserted(bootDevice)) { SetFavorite(&btnFavorite1, &btnFavorite2, &btnFavorite3, &btnFavorite4, &btnFavorite5, header->id, 3); SetFavoriteImages(&btnFavoriteImg1, &btnFavoriteImg2, &btnFavoriteImg3, &btnFavoriteImg4, &btnFavoriteImg5, &imgFavorite, &imgNotFavorite); @@ -1404,7 +1402,6 @@ int GameWindowPrompt() { btnFavorite3.ResetState(); } else if (btnFavorite4.GetState() == STATE_CLICKED) {//switch favorite - //if(isSdInserted()) { if (isInserted(bootDevice)) { SetFavorite(&btnFavorite1, &btnFavorite2, &btnFavorite3, &btnFavorite4, &btnFavorite5, header->id, 4); SetFavoriteImages(&btnFavoriteImg1, &btnFavoriteImg2, &btnFavoriteImg3, &btnFavoriteImg4, &btnFavoriteImg5, &imgFavorite, &imgNotFavorite); @@ -1412,7 +1409,6 @@ int GameWindowPrompt() { btnFavorite4.ResetState(); } else if (btnFavorite5.GetState() == STATE_CLICKED) {//switch favorite - //if(isSdInserted()) { if (isInserted(bootDevice)) { SetFavorite(&btnFavorite1, &btnFavorite2, &btnFavorite3, &btnFavorite4, &btnFavorite5, header->id, 5); SetFavoriteImages(&btnFavoriteImg1, &btnFavoriteImg2, &btnFavoriteImg3, &btnFavoriteImg4, &btnFavoriteImg5, &imgFavorite, &imgNotFavorite); @@ -1823,7 +1819,7 @@ bool SearchMissingImages(int choice2) { __Menu_GetEntries(); ResumeGui(); - if (cntMissFiles > 0) { //&& !IsNetworkInit()) { + if (cntMissFiles > 0) { NetworkInitPrompt(); } @@ -1837,6 +1833,10 @@ bool SearchMissingImages(int choice2) { * NetworkInitPrompt ***************************************************************************/ bool NetworkInitPrompt() { + + if (IsNetworkInit()) + return true; + bool success = true; GuiWindow promptWindow(472,320); @@ -2548,23 +2548,9 @@ int ProgressUpdateWindow() { } //make the URL to get XML based on our games - 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); - 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%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); - } - } - __Menu_GetEntries(); + char XMLurl[3540]; + build_XML_URL(XMLurl,sizeof(XMLurl)); + if (IsNetworkInit() && ret >= 0) { updatemode = WindowPrompt(tr("What do you want to update?"), 0, "USBLoader GX", tr("WiiTDB Files"), tr("Languagefile"), tr("Cancel")); @@ -2868,23 +2854,9 @@ int ProgressUpdateWindow() { } //make the URL to get XML based on our games - char XMLurl[3540]; - char filename[10]; - __Menu_GetEntries(1); - 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%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); - } - } - __Menu_GetEntries(); + char XMLurl[3540]; + build_XML_URL(XMLurl,sizeof(XMLurl)); + 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 snprintf(dolpath, sizeof(dolpath), "%sULNR.wad", Settings.covers_path); diff --git a/source/prompts/gameinfo.cpp b/source/prompts/gameinfo.cpp index 2f5230c7..3a1c416e 100644 --- a/source/prompts/gameinfo.cpp +++ b/source/prompts/gameinfo.cpp @@ -1086,26 +1086,10 @@ bool save_XML_URL() { // save xml url as as txt file for people without wifi sleep(1); return false; } - //make sure that all games are added to the gamelist - __Menu_GetEntries(1); - - char XMLurl[3540]; - char filename[10]; - - 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%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); - } - } - + + char XMLurl[3540]; + build_XML_URL(XMLurl,sizeof(XMLurl)); + fprintf(f, "# USB Loader Has Saved this file\n"); fprintf(f, "# This URL was created based on your list of games and language settings.\n"); fclose(f); @@ -1118,7 +1102,6 @@ bool save_XML_URL() { // save xml url as as txt file for people without wifi fclose(f); - __Menu_GetEntries(); return true; } @@ -1129,3 +1112,24 @@ void MemInfoPrompt() strlcpy(meminfotxt,MemInfo(),sizeof(meminfotxt)); WindowPrompt(0,meminfotxt, tr("OK")); } + + +void build_XML_URL(char *XMLurl, int XMLurlsize) { + __Menu_GetEntries(1); + // NET_BUFFER_SIZE in http.c needs to be set to size of XMLurl + 40 + char url[3540]; + char filename[10]; + snprintf(url,sizeof(url),"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%c%c%c", header->id[0], header->id[1], header->id[2],header->id[3], header->id[4], header->id[5]); + strncat(url,filename,6); + if ((i!=gameCnt-1)&&(i<500)) + strncat(url, ",",1); + } + } + strlcpy(XMLurl,url,XMLurlsize); + __Menu_GetEntries(); +} diff --git a/source/prompts/gameinfo.h b/source/prompts/gameinfo.h index c8bc701e..4f46670b 100644 --- a/source/prompts/gameinfo.h +++ b/source/prompts/gameinfo.h @@ -9,6 +9,7 @@ #define _GAMEINFO_H_ int showGameInfo(char *ID); +void build_XML_URL(char *XMLurl, int XMLurlsize); bool save_XML_URL(); bool save_gamelist(int txt); void MemInfoPrompt(); diff --git a/source/settings/Settings.cpp b/source/settings/Settings.cpp index 6c19a1a1..6fcd66cd 100644 --- a/source/settings/Settings.cpp +++ b/source/settings/Settings.cpp @@ -551,7 +551,6 @@ int MenuSettings() { switch (ret) { case 0: - //if(isSdInserted()) { if (isInserted(bootDevice)) { if ( Settings.godmode == 1) { w.SetEffect(EFFECT_FADE, -20); @@ -1130,7 +1129,6 @@ int MenuSettings() { switch (ret) { case 0: - //if(isSdInserted()) if (isInserted(bootDevice)) { w.SetEffect(EFFECT_FADE, -20); while (w.GetEffect()>0) usleep(50); @@ -1293,7 +1291,6 @@ int MenuSettings() { strncat (entered, "/", 1); strlcpy(Settings.covers_path, entered, sizeof(Settings.covers_path)); WindowPrompt(tr("Cover Path Changed"),0,tr("OK")); - // if(!isSdInserted()) { if (!isInserted(bootDevice)) { WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK")); } @@ -1319,7 +1316,6 @@ int MenuSettings() { strncat (entered, "/", 1); strlcpy(Settings.covers2d_path, entered, sizeof(Settings.covers2d_path)); WindowPrompt(tr("Cover Path Changed"),0,tr("OK")); - // if(!isSdInserted()) { if (!isInserted(bootDevice)) { WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK")); } @@ -1345,7 +1341,6 @@ int MenuSettings() { strncat (entered, "/", 1); strlcpy(Settings.disc_path, entered, sizeof(Settings.disc_path)); WindowPrompt(tr("Disc Path Changed"),0,tr("OK")); - // if(!isSdInserted()) { if (!isInserted(bootDevice)) { WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK")); } @@ -1370,7 +1365,6 @@ int MenuSettings() { strncat (entered, "/", 1); strlcpy(CFG.theme_path, entered, sizeof(CFG.theme_path)); WindowPrompt(tr("Theme Path Changed"),0,tr("OK")); - // if(!isSdInserted()) { if (!isInserted(bootDevice)) { WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK")); } else { @@ -1430,7 +1424,6 @@ int MenuSettings() { strncat (entered, "/", 1); strlcpy(Settings.titlestxt_path, entered, sizeof(Settings.titlestxt_path)); WindowPrompt(tr("WiiTDB Path changed."),0,tr("OK")); - // if(isSdInserted()) { if (isInserted(bootDevice)) { cfg_save_global(); HaltGui(); @@ -1524,7 +1517,6 @@ int MenuSettings() { strncat (entered, "/", 1); strlcpy(Settings.dolpath, entered, sizeof(Settings.dolpath)); WindowPrompt(tr("DOL path changed"),0,tr("OK")); - // if(!isSdInserted()) { if (!isInserted(bootDevice)) { WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK")); } @@ -1550,7 +1542,6 @@ int MenuSettings() { strncat (entered, "/", 1); strlcpy(Settings.homebrewapps_path, entered, sizeof(Settings.homebrewapps_path)); WindowPrompt(tr("Homebrew Appspath changed"),0,tr("OK")); - // if(!isSdInserted()) { if (!isInserted(bootDevice)) { WindowPrompt(tr("No SD-Card inserted!"), tr("Insert an SD-Card to save."), tr("OK")); } @@ -1601,7 +1592,6 @@ int MenuSettings() { w.Remove(&MainButton2); w.Remove(&MainButton3); w.Remove(&MainButton4); -// if(isSdInserted() && Settings.godmode) { if (isInserted(bootDevice) && Settings.godmode) { w.Remove(&optionBrowser2); w.Remove(&backBtn); @@ -1639,7 +1629,6 @@ int MenuSettings() { if (Settings.godmode) { int choice = WindowPrompt(tr("Are you sure?"), 0, tr("Yes"), tr("Cancel")); if (choice == 1) { -// if(isSdInserted()) if (isInserted(bootDevice)) { char GXGlobal_cfg[26]; sprintf(GXGlobal_cfg, "%s/config/GXGlobal.cfg", bootDevice); @@ -1692,7 +1681,6 @@ int MenuSettings() { else if (backBtn.GetState() == STATE_CLICKED) { //Add the procedure call to save the global configuration -// if(isSdInserted()) { if (isInserted(bootDevice)) { cfg_save_global(); } diff --git a/source/settings/SettingsPrompts.cpp b/source/settings/SettingsPrompts.cpp index e30266ad..5590bd70 100644 --- a/source/settings/SettingsPrompts.cpp +++ b/source/settings/SettingsPrompts.cpp @@ -232,7 +232,6 @@ bool MenuOGG() { strncat (entered, "/", 1); strlcpy(Settings.oggload_path, entered, sizeof(Settings.oggload_path)); WindowPrompt(tr("Backgroundmusic Path changed."),0,tr("OK")); -// if(isSdInserted()) { if (isInserted(bootDevice)) { if (!strcmp("", Settings.oggload_path)) { sprintf(Settings.ogg_path, "notset"); @@ -549,7 +548,6 @@ int MenuLanguageSelect() { strncat (entered, "/", 1); strlcpy(Settings.languagefiles_path, entered, sizeof(Settings.languagefiles_path)); WindowPrompt(tr("Languagepath changed."),0,tr("OK")); -// if(isSdInserted()) { if (isInserted(bootDevice)) { cfg_save_global(); returnhere = 1; @@ -569,7 +567,6 @@ int MenuLanguageSelect() { if (ret>=0) { choice = WindowPrompt(tr("Do you want to change language?"), 0, tr("Yes"), tr("Cancel")); if (choice == 1) { -// if(isSdInserted()) { if (isInserted(bootDevice)) { snprintf(Settings.language_path, sizeof(Settings.language_path), "%s%s", Settings.languagefiles_path, GetFileName(ret)); cfg_save_global();