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
This commit is contained in:
giantpune 2009-07-29 19:27:24 +00:00
parent d5ba67e305
commit ab4cbd6314
2 changed files with 31 additions and 27 deletions

View File

@ -221,12 +221,14 @@ void ExitGUIThreads()
void rockout(int f = 0) void rockout(int f = 0)
{ {
if (f==2)gameSelected = -1; HaltGui();
int num=(f==2?-1:gameSelected);
char imgPath[100]; char imgPath[100];
#ifdef HW_RVL #ifdef HW_RVL
if(!(strcasestr(get_title(&gameList[gameSelected]),"guitar")|| if(!(strcasestr(get_title(&gameList[num]),"guitar")||
strcasestr(get_title(&gameList[gameSelected]),"band")|| strcasestr(get_title(&gameList[num]),"band")||
strcasestr(get_title(&gameList[gameSelected]),"rock")|| strcasestr(get_title(&gameList[num]),"rock")||
f==1)){ f==1)){
for(int i = 0; i < 4; i++) for(int i = 0; i < 4; i++)
delete pointer[i]; delete pointer[i];
@ -253,7 +255,7 @@ void rockout(int f = 0)
pointer[3] = new GuiImageData(imgPath, rplayer4_point_png); pointer[3] = new GuiImageData(imgPath, rplayer4_point_png);
} }
#endif #endif
ResumeGui();
} }
/**************************************************************************** /****************************************************************************
@ -1364,6 +1366,7 @@ int MenuDiscList()
break; break;
} }
returnHere = true; returnHere = true;
rockout(2);
} }
else if (choice == 3) //WBFS renaming else if (choice == 3) //WBFS renaming
@ -1381,12 +1384,13 @@ int MenuDiscList()
} }
} }
else if(choice == 0) { else if(choice == 0) {
rockout(2);
if (Settings.gameDisplay==list){gameBrowser->SetFocus(1);} if (Settings.gameDisplay==list){gameBrowser->SetFocus(1);}
else if (Settings.gameDisplay==grid){gameGrid->SetFocus(1);} else if (Settings.gameDisplay==grid){gameGrid->SetFocus(1);}
else if (Settings.gameDisplay==carousel){gameCarousel->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 // to skip the first call of windowScreensaver at startup when wiimote is not connected

View File

@ -509,27 +509,7 @@ int showGameInfo(char *ID)
titleTxt->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); titleTxt->SetPosition(txtXOffset,12+titley); titleTxt->SetAlignment(ALIGN_CENTRE, ALIGN_TOP); titleTxt->SetPosition(txtXOffset,12+titley);
gameinfoWindow.Append(titleTxt); 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 //date
snprintf(linebuf2, sizeof(linebuf2), " "); snprintf(linebuf2, sizeof(linebuf2), " ");
if (strcmp(gameinfo.day,"") != 0) if (strcmp(gameinfo.day,"") != 0)
@ -583,6 +563,26 @@ int showGameInfo(char *ID)
gameinfoWindow.Append(releasedTxt); 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 //genre
int genreY = marginY; int genreY = marginY;
genreTxt = new GuiText * [gameinfo.genreCnt + 1]; genreTxt = new GuiText * [gameinfo.genreCnt + 1];