diff --git a/gui.pnps b/gui.pnps
index a7b6fcb2..0898b0df 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 c9c3e171..795b5d79 100644
--- a/source/libwiigui/gui_text.cpp
+++ b/source/libwiigui/gui_text.cpp
@@ -301,10 +301,11 @@ void GuiText::Draw()
{
if(i == 0)
tmptext[linenum] = new wchar_t[strlen + 1];
-
+
tmptext[linenum][i] = text[ch];
tmptext[linenum][i+1] = 0;
+
if(text[ch] == ' ' || ch == strlen-1)
{
if((font ? font : fontSystem)->getWidth(tmptext[linenum]) >= maxWidth)
@@ -325,11 +326,15 @@ void GuiText::Draw()
linenum++;
}
}
- if(text[ch] == ' ' && i >= 0)
+ if((text[ch] == ' ' && i >= 0)||
+ text[ch] == '\r' || text[ch] == '\n'
+ || text[ch] == 0x0D|| text[ch] == 0x0A)
{
lastSpace = ch;
lastSpaceIndex = i;
}
+
+
ch++;
i++;
}
diff --git a/source/menu.cpp b/source/menu.cpp
index 0ca24342..da007ce9 100644
--- a/source/menu.cpp
+++ b/source/menu.cpp
@@ -1190,7 +1190,7 @@ int MenuDiscList() {
}
}
- SDCard_deInit();
+
wiilight(0);
if (isInserted(bootDevice)) {
//////////save game play count////////////////
@@ -1207,7 +1207,7 @@ int MenuDiscList() {
CFG_save_game_num(header->id);
}
-
+ SDCard_deInit();
menu = MENU_EXIT;
break;
diff --git a/source/prompts/TitleBrowser.cpp b/source/prompts/TitleBrowser.cpp
index 207d1d68..4077a112 100644
--- a/source/prompts/TitleBrowser.cpp
+++ b/source/prompts/TitleBrowser.cpp
@@ -463,10 +463,10 @@ int TitleBrowser(u32 type) {
network_read((u8*) &filename, 100);
sprintf(tmptxt,"%s",filename);
//if we got a wad
- if (strstr(tmptxt,".wad") || strstr(tmptxt,".WAD")) {
+ if (strcasestr(tmptxt,".wad")) {
sprintf(tmptxt,"%s/wad/%s",bootDevice,filename);
-
+ if (checkfile(tmptxt))remove(tmptxt);
rename(filepath, tmptxt);
//check and make sure the wad we just saved is the correct size
diff --git a/source/wad/wad.cpp b/source/wad/wad.cpp
index d2bfed00..15d7dfb1 100644
--- a/source/wad/wad.cpp
+++ b/source/wad/wad.cpp
@@ -234,6 +234,7 @@ s32 Wad_Install(FILE *fp)
///start the wad shit
+ bool fail = false;
wadHeader *header = NULL;
signed_blob *p_certs = NULL, *p_crl = NULL, *p_tik = NULL, *p_tmd = NULL;
@@ -399,7 +400,10 @@ s32 Wad_Install(FILE *fp)
err:
//char titties[100];
+ ResumeGui();
prTxt.SetTextf("%s%d", tr("Error..."),ret);
+ promptWindow.Append(&prTxt);
+ fail = true;
//snprintf(titties, sizeof(titties), "%d", ret);
//printf(" ERROR! (ret = %d)\n", ret);
//WindowPrompt("ERROR!",titties,"Back",0,0);
@@ -424,7 +428,7 @@ out:
exit:
- msg5Txt.SetText(tr("Finishing installation... Ok!"));
+ if (!fail)msg5Txt.SetText(tr("Finishing installation... Ok!"));
promptWindow.Append(&btn1);
while(btn1.GetState() != STATE_CLICKED){
}