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)
{
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

View File

@ -510,26 +510,6 @@ int showGameInfo(char *ID)
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];