mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-12-19 00:11:55 +01:00
*Fixed code dumps related to showing only favorites
*Fixed having no games installed and removed the old workaround
This commit is contained in:
parent
93aadca881
commit
306644b518
@ -26,22 +26,14 @@ GuiGameBrowser::GuiGameBrowser(int w, int h, struct discHdr * l, int gameCnt, co
|
||||
{
|
||||
width = w;
|
||||
height = h;
|
||||
if (gameCnt == 0) {
|
||||
focus = 0;
|
||||
dontsetfocus = 1;
|
||||
} else {
|
||||
gameList = l;
|
||||
dontsetfocus = 0;
|
||||
focus = 1;
|
||||
}
|
||||
this->gameCnt = gameCnt;
|
||||
|
||||
pagesize = (gameCnt > THEME.pagesize) ? THEME.pagesize : gameCnt;
|
||||
scrollbaron = (gameCnt > THEME.pagesize) ? 1 : 0;
|
||||
gameList = l;
|
||||
pagesize = THEME.pagesize;
|
||||
scrollbaron = (gameCnt > pagesize) ? 1 : 0;
|
||||
selectable = true;
|
||||
listOffset = (offset == 0) ? this->FindMenuItem(-1, 1) : offset;
|
||||
selectedItem = selected - offset;
|
||||
// allow focus
|
||||
focus = 1; // allow focus
|
||||
char imgPath[100];
|
||||
|
||||
trigA = new GuiTrigger;
|
||||
@ -205,7 +197,6 @@ GuiGameBrowser::~GuiGameBrowser()
|
||||
void GuiGameBrowser::SetFocus(int f)
|
||||
{
|
||||
LOCK(this);
|
||||
if(!dontsetfocus)
|
||||
focus = f;
|
||||
|
||||
for(int i=0; i<pagesize; i++)
|
||||
@ -371,7 +362,7 @@ void GuiGameBrowser::Update(GuiTrigger * t)
|
||||
game[i]->SetState(STATE_DISABLED);
|
||||
}
|
||||
|
||||
if(focus || !dontsetfocus)
|
||||
if(focus)
|
||||
{
|
||||
if(i != selectedItem && game[i]->GetState() == STATE_SELECTED)
|
||||
game[i]->ResetState();
|
||||
@ -388,7 +379,7 @@ void GuiGameBrowser::Update(GuiTrigger * t)
|
||||
}
|
||||
|
||||
// pad/joystick navigation
|
||||
if(!focus || dontsetfocus)
|
||||
if(!focus)
|
||||
return; // skip navigation
|
||||
|
||||
if (scrollbaron == 1) {
|
||||
@ -640,8 +631,7 @@ void GuiGameBrowser::Reload(struct discHdr * l, int count)
|
||||
LOCK(this);
|
||||
gameList = l;
|
||||
gameCnt = count;
|
||||
scrollbaron = (gameCnt > THEME.pagesize) ? 1 : 0;
|
||||
pagesize = (gameCnt > THEME.pagesize) ? THEME.pagesize : gameCnt;
|
||||
scrollbaron = (gameCnt > pagesize) ? 1 : 0;
|
||||
selectedItem = 0;
|
||||
listOffset = 0;
|
||||
|
||||
|
@ -2722,7 +2722,6 @@ static int MenuDiscList()
|
||||
char imgPath[100];
|
||||
char buf[4];
|
||||
__Menu_GetEntries();
|
||||
if (gameCnt==0){Settings.sort=all;__Menu_GetEntries();}
|
||||
|
||||
f32 freespace, used, size = 0.0;
|
||||
u32 nolist;
|
||||
@ -3170,7 +3169,7 @@ static int MenuDiscList()
|
||||
gameBrowser.Reload(gameList, gameCnt);
|
||||
sprintf(GamesCnt,"%s: %i",LANGUAGE.Games, gameCnt);
|
||||
gamecntTxt.SetText(GamesCnt);
|
||||
selectedold=-1;
|
||||
selectedold = 1;
|
||||
favoriteBtnImg.SetImage(dispFave ? &imgFavoriteOn : &imgFavoriteOff);
|
||||
favoriteBtn.ResetState();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user