diff --git a/gui.pnproj b/gui.pnproj index ce3d65fd..304268b1 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 0898b0df..8aa31c7a 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/homebrewboot/HomebrewXML.cpp b/source/homebrewboot/HomebrewXML.cpp index 29c58724..ad21bcf7 100644 --- a/source/homebrewboot/HomebrewXML.cpp +++ b/source/homebrewboot/HomebrewXML.cpp @@ -33,7 +33,7 @@ int HomebrewXML::LoadHomebrewXMLData(const char* filename) { return -1; } - nodetreeHB = mxmlLoadFile(NULL, filexml, MXML_NO_CALLBACK); + nodetreeHB = mxmlLoadFile(NULL, filexml, MXML_OPAQUE_CALLBACK); fclose(filexml); if (nodetreeHB == NULL) { diff --git a/source/libwiigui/gui_text.cpp b/source/libwiigui/gui_text.cpp index 795b5d79..a58525a8 100644 --- a/source/libwiigui/gui_text.cpp +++ b/source/libwiigui/gui_text.cpp @@ -292,22 +292,31 @@ void GuiText::Draw() int i = 0; int ch = 0; int linenum = 0; + int linemax = 200; int lastSpace = -1; int lastSpaceIndex = -1; - wchar_t * tmptext[55]; + wchar_t * tmptext[linemax]; totalLines=0; while(ch < strlen) { if(i == 0) - tmptext[linenum] = new wchar_t[strlen + 1]; + { + if (linenum <= linemax) + { + tmptext[linenum] = new wchar_t[strlen + 1]; + } + else + { + break; + } + } tmptext[linenum][i] = text[ch]; tmptext[linenum][i+1] = 0; - - if(text[ch] == ' ' || ch == strlen-1) - { + //if(text[ch] == ' ' || ch == strlen-1) + //{ if((font ? font : fontSystem)->getWidth(tmptext[linenum]) >= maxWidth) //if(fontSystem->getWidth(tmptext[linenum]) >= maxWidth) { @@ -325,16 +334,17 @@ void GuiText::Draw() { linenum++; } - } - if((text[ch] == ' ' && i >= 0)|| - text[ch] == '\r' || text[ch] == '\n' - || text[ch] == 0x0D|| text[ch] == 0x0A) + //} + if(text[ch] == ' ' && i >= 0) { lastSpace = ch; lastSpaceIndex = i; } - - + if(text[ch] == '\n' && ch != strlen-1 && i >= 0) + { + linenum++; + i = -1; + } ch++; i++; } @@ -351,7 +361,7 @@ void GuiText::Draw() } } - //put in for txt verticle txt scrolling + //put in for txt vertical txt scrolling else { int j; i=0; diff --git a/source/menu.cpp b/source/menu.cpp index da007ce9..70686736 100644 --- a/source/menu.cpp +++ b/source/menu.cpp @@ -1076,6 +1076,7 @@ int MenuDiscList() { case 'I': case 'S': case 'H': + case 'U': case 'X': case 'Y': sprintf(gameregion," PAL "); diff --git a/source/prompts/PromptWindows.cpp b/source/prompts/PromptWindows.cpp index c5b94cef..c35d89d4 100644 --- a/source/prompts/PromptWindows.cpp +++ b/source/prompts/PromptWindows.cpp @@ -22,6 +22,7 @@ #include "fatmounter.h" #include "listfiles.h" #include "menu.h" +#include "menu.h" #include "filelist.h" #include "sys.h" #include "wpad.h" @@ -2037,6 +2038,7 @@ ProgressDownloadWindow(int choice2) { case 'I': case 'S': case 'H': + case 'U': case 'X': case 'Y': sprintf(URLFile,"%s%s/%s",server3d,Settings.db_language,missingFiles[i]); @@ -2118,6 +2120,7 @@ ProgressDownloadWindow(int choice2) { case 'I': case 'S': case 'H': + case 'U': case 'X': case 'Y': if(Settings.discart == 0) { @@ -2197,6 +2200,7 @@ ProgressDownloadWindow(int choice2) { case 'I': case 'S': case 'H': + case 'U': case 'X': case 'Y': sprintf(URLFile,"%s%s/%s",server2d,Settings.db_language,missingFiles[i]); diff --git a/source/prompts/gameinfo.cpp b/source/prompts/gameinfo.cpp index 60594f80..2fe20e09 100644 --- a/source/prompts/gameinfo.cpp +++ b/source/prompts/gameinfo.cpp @@ -70,8 +70,8 @@ int showGameInfo(char *ID) { microphone=0, zapper=0, nintendods=0, - wiispeak=0, - vitalitysensor=0; + //vitalitysensor=0, + wiispeak=0; int newline=1; u8 page=1; @@ -94,7 +94,7 @@ int showGameInfo(char *ID) { GuiImage * zapperImg = NULL; GuiImage * nintendodsImg = NULL; GuiImage * wiispeakImg = NULL; - GuiImage * vitalitysensorImg = NULL; + //GuiImage * vitalitysensorImg = NULL; GuiImage * gcImg = NULL; GuiImage * dialogBoxImg1 = NULL; GuiImage * dialogBoxImg2 = NULL; @@ -119,7 +119,7 @@ int showGameInfo(char *ID) { GuiImageData * zapperImgData = NULL; GuiImageData * nintendodsImgData = NULL; GuiImageData * wiispeakImgData = NULL; - GuiImageData * vitalitysensorImgData = NULL; + //GuiImageData * vitalitysensorImgData = NULL; GuiImageData * gamecubeImgData = NULL; GuiImageData * ratingImgData = NULL; GuiImageData * cover = NULL; @@ -233,8 +233,8 @@ int showGameInfo(char *ID) { nintendods=1; if (strcmp(gameinfo.accessoriesReq[i],"wiispeak")==0) wiispeak=1; - if (strcmp(gameinfo.accessoriesReq[i],"vitalitysensor")==0) - vitalitysensor=1; + //if (strcmp(gameinfo.accessoriesReq[i],"vitalitysensor")==0) + // vitalitysensor=1; if (strcmp(gameinfo.accessoriesReq[i],"gamecube")==0) gamecube=1; } @@ -308,8 +308,8 @@ int showGameInfo(char *ID) { nintendods=1; if (strcmp(gameinfo.accessories[i],"wiispeak")==0) wiispeak=1; - if (strcmp(gameinfo.accessories[i],"vitalitysensor")==0) - vitalitysensor=1; + //if (strcmp(gameinfo.accessories[i],"vitalitysensor")==0) + // vitalitysensor=1; if (strcmp(gameinfo.accessories[i],"gamecube")==0) gamecube=1; } @@ -907,7 +907,7 @@ int showGameInfo(char *ID) { delete zapperImg; delete wiispeakImg; delete nintendodsImg; - delete vitalitysensorImg; + //delete vitalitysensorImg; delete gcImg; delete dialogBoxImg1; delete dialogBoxImg2; @@ -932,7 +932,7 @@ int showGameInfo(char *ID) { delete zapperImgData; delete wiispeakImgData; delete nintendodsImgData; - delete vitalitysensorImgData; + //delete vitalitysensorImgData; delete gamecubeImgData; delete ratingImgData; delete cover; diff --git a/source/xml/xml.c b/source/xml/xml.c index 16faf4d2..20c0aabf 100644 --- a/source/xml/xml.c +++ b/source/xml/xml.c @@ -139,7 +139,7 @@ bool OpenXMLFile(char *filename) { if (!filexml) return false; - nodetree = mxmlLoadFile(NULL, filexml, MXML_NO_CALLBACK); + nodetree = mxmlLoadFile(NULL, filexml, MXML_OPAQUE_CALLBACK); fclose(filexml); } else { @@ -170,7 +170,7 @@ bool OpenXMLFile(char *filename) { unzCloseCurrentFile(unzfile); unzClose(unzfile); - nodetree = mxmlLoadString(NULL, zipfilebuffer, MXML_NO_CALLBACK); + nodetree = mxmlLoadString(NULL, zipfilebuffer, MXML_OPAQUE_CALLBACK); free(zipfilebuffer); } @@ -583,6 +583,7 @@ bool LoadGameInfoFromXML(char* gameid, char* langtxt) if (gameid[3] == 'I') strlcpy(gameinfo.region,"PAL",sizeof(gameinfo.region)); if (gameid[3] == 'S') strlcpy(gameinfo.region,"PAL",sizeof(gameinfo.region)); if (gameid[3] == 'H') strlcpy(gameinfo.region,"PAL",sizeof(gameinfo.region)); + if (gameid[3] == 'U') strlcpy(gameinfo.region,"PAL",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)); }