From ab4cbd63142ff57cb4e1e0311e686f1336e70da2 Mon Sep 17 00:00:00 2001 From: giantpune Date: Wed, 29 Jul 2009 19:27:24 +0000 Subject: [PATCH] fixed bug i made in 668 causing games not to load (because we rocked out too hard) fixed bug which overlapped the release date and publisher in the game info screen --- source/menu.cpp | 18 ++++++++++------- source/prompts/gameinfo.cpp | 40 ++++++++++++++++++------------------- 2 files changed, 31 insertions(+), 27 deletions(-) diff --git a/source/menu.cpp b/source/menu.cpp index 52f2c901..5c7fc04e 100644 --- a/source/menu.cpp +++ b/source/menu.cpp @@ -221,12 +221,14 @@ void ExitGUIThreads() void rockout(int f = 0) { - if (f==2)gameSelected = -1; + HaltGui(); + int num=(f==2?-1:gameSelected); + char imgPath[100]; #ifdef HW_RVL - if(!(strcasestr(get_title(&gameList[gameSelected]),"guitar")|| - strcasestr(get_title(&gameList[gameSelected]),"band")|| - strcasestr(get_title(&gameList[gameSelected]),"rock")|| + if(!(strcasestr(get_title(&gameList[num]),"guitar")|| + strcasestr(get_title(&gameList[num]),"band")|| + strcasestr(get_title(&gameList[num]),"rock")|| f==1)){ for(int i = 0; i < 4; i++) delete pointer[i]; @@ -253,7 +255,7 @@ void rockout(int f = 0) pointer[3] = new GuiImageData(imgPath, rplayer4_point_png); } #endif - + ResumeGui(); } /**************************************************************************** @@ -1364,6 +1366,7 @@ int MenuDiscList() break; } returnHere = true; + rockout(2); } else if (choice == 3) //WBFS renaming @@ -1381,12 +1384,13 @@ int MenuDiscList() } } else if(choice == 0) { + rockout(2); if (Settings.gameDisplay==list){gameBrowser->SetFocus(1);} else if (Settings.gameDisplay==grid){gameGrid->SetFocus(1);} else if (Settings.gameDisplay==carousel){gameCarousel->SetFocus(1);} } - //reset cursor - rockout(2); + + } } // to skip the first call of windowScreensaver at startup when wiimote is not connected diff --git a/source/prompts/gameinfo.cpp b/source/prompts/gameinfo.cpp index 63e94906..5b5ae9f2 100644 --- a/source/prompts/gameinfo.cpp +++ b/source/prompts/gameinfo.cpp @@ -509,27 +509,7 @@ int showGameInfo(char *ID) titleTxt->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); titleTxt->SetPosition(txtXOffset,12+titley); gameinfoWindow.Append(titleTxt); } - - //publisher - if (strcmp(gameinfo.publisher,"") != 0){ - snprintf(linebuf, sizeof(linebuf), "%s %s", tr("Published by"), gameinfo.publisher); - publisherTxt = new GuiText(linebuf, 16, (GXColor){0,0,0, 255}); - if (publisherTxt->GetWidth()>250) newline=2; - publisherTxt->SetMaxWidth(250,GuiText::WRAP); - publisherTxt->SetAlignment(ALIGN_RIGHT, ALIGN_TOP); publisherTxt->SetPosition(-17,12+indexy); indexy+=(20 * newline);newline=1; - gameinfoWindow.Append(publisherTxt); - } - //developer - if (strcmp(gameinfo.developer,"") != 0 && strcasecmp(gameinfo.developer,gameinfo.publisher) != 0) { - snprintf(linebuf, sizeof(linebuf), "%s %s", tr("Developed by"), gameinfo.developer); - developerTxt = new GuiText(linebuf, 16, (GXColor){0,0,0, 255}); - if (developerTxt->GetWidth()>250) newline=2; - developerTxt->SetMaxWidth(250,GuiText::WRAP); - developerTxt->SetAlignment(ALIGN_RIGHT, ALIGN_TOP); developerTxt->SetPosition(-17,12+indexy); indexy+=(20 * newline);newline=1; - gameinfoWindow.Append(developerTxt); - } - //date snprintf(linebuf2, sizeof(linebuf2), " "); if (strcmp(gameinfo.day,"") != 0) @@ -583,6 +563,26 @@ int showGameInfo(char *ID) gameinfoWindow.Append(releasedTxt); } + //publisher + if (strcmp(gameinfo.publisher,"") != 0){ + snprintf(linebuf, sizeof(linebuf), "%s %s", tr("Published by"), gameinfo.publisher); + publisherTxt = new GuiText(linebuf, 16, (GXColor){0,0,0, 255}); + if (publisherTxt->GetWidth()>250) newline=2; + publisherTxt->SetMaxWidth(250,GuiText::WRAP); + publisherTxt->SetAlignment(ALIGN_RIGHT, ALIGN_TOP); publisherTxt->SetPosition(-17,12+indexy); indexy+=(20 * newline);newline=1; + gameinfoWindow.Append(publisherTxt); + } + + //developer + if (strcmp(gameinfo.developer,"") != 0 && strcasecmp(gameinfo.developer,gameinfo.publisher) != 0) { + snprintf(linebuf, sizeof(linebuf), "%s %s", tr("Developed by"), gameinfo.developer); + developerTxt = new GuiText(linebuf, 16, (GXColor){0,0,0, 255}); + if (developerTxt->GetWidth()>250) newline=2; + developerTxt->SetMaxWidth(250,GuiText::WRAP); + developerTxt->SetAlignment(ALIGN_RIGHT, ALIGN_TOP); developerTxt->SetPosition(-17,12+indexy); indexy+=(20 * newline);newline=1; + gameinfoWindow.Append(developerTxt); + } + //genre int genreY = marginY; genreTxt = new GuiText * [gameinfo.genreCnt + 1];