mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-12-19 08:21:54 +01:00
*Better fix for zero entries (fixes teh problem instead of avoiding it)
*Moved a button
This commit is contained in:
parent
4cb00becda
commit
59905d623d
@ -650,17 +650,9 @@ void GuiGameBrowser::Reload(struct discHdr * l, int count)
|
|||||||
LOCK(this);
|
LOCK(this);
|
||||||
gameList = l;
|
gameList = l;
|
||||||
gameCnt = count;
|
gameCnt = count;
|
||||||
if (gameCnt == 0) {
|
|
||||||
focus = 0;
|
|
||||||
dontsetfocus = 1;
|
|
||||||
} else {
|
|
||||||
dontsetfocus = 0;
|
|
||||||
focus = 1;
|
|
||||||
selectedItem = 0;
|
|
||||||
}
|
|
||||||
gameList = l;
|
|
||||||
scrollbaron = (gameCnt > THEME.pagesize) ? 1 : 0;
|
scrollbaron = (gameCnt > THEME.pagesize) ? 1 : 0;
|
||||||
pagesize = (gameCnt > THEME.pagesize) ? THEME.pagesize : gameCnt;
|
pagesize = (gameCnt > THEME.pagesize) ? THEME.pagesize : gameCnt;
|
||||||
|
selectedItem = 0;
|
||||||
listOffset = 0;
|
listOffset = 0;
|
||||||
|
|
||||||
for(int i=0; i<pagesize; i++)
|
for(int i=0; i<pagesize; i++)
|
||||||
|
@ -772,7 +772,7 @@ WindowExitPrompt(const char *title, const char *msg, const char *btn1Label,
|
|||||||
GuiButton closeBtn(close.GetWidth(), close.GetHeight());
|
GuiButton closeBtn(close.GetWidth(), close.GetHeight());
|
||||||
closeBtn.SetImage(&closeImg);
|
closeBtn.SetImage(&closeImg);
|
||||||
closeBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
closeBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||||
closeBtn.SetPosition(220,48);
|
closeBtn.SetPosition(205,40);
|
||||||
closeBtn.SetLabel(&closeTxt);
|
closeBtn.SetLabel(&closeTxt);
|
||||||
closeBtn.SetRumble(false);
|
closeBtn.SetRumble(false);
|
||||||
closeBtn.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 50);
|
closeBtn.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 50);
|
||||||
@ -2408,35 +2408,43 @@ s32 __Menu_GetEntries(void)
|
|||||||
cnt2++;
|
cnt2++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (buffer2) {
|
||||||
free(buffer);
|
free(buffer);
|
||||||
buffer = buffer2;
|
buffer = buffer2;
|
||||||
buffer2 = NULL;
|
buffer2 = NULL;
|
||||||
|
} else {
|
||||||
|
memset(buffer, 0, len);
|
||||||
|
}
|
||||||
cnt = cnt2;
|
cnt = cnt2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CFG.parentalcontrol && !CFG.godmode)
|
if (CFG.parentalcontrol && !CFG.godmode)
|
||||||
{
|
{
|
||||||
u32 cnt2 = 0;
|
u32 cnt3 = 0;
|
||||||
|
|
||||||
for (u32 i = 0; i < cnt; i++)
|
for (u32 i = 0; i < cnt; i++)
|
||||||
{
|
{
|
||||||
if (get_block(header) < CFG.parentalcontrol)
|
if (get_block(header) < CFG.parentalcontrol)
|
||||||
{
|
{
|
||||||
buffer2 = (discHdr *) realloc(buffer2, (cnt2+1) * sizeof(struct discHdr));
|
buffer2 = (discHdr *) realloc(buffer2, (cnt3+1) * sizeof(struct discHdr));
|
||||||
if (!buffer2)
|
if (!buffer2)
|
||||||
{
|
{
|
||||||
free(buffer);
|
free(buffer);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy((buffer2 + cnt2), (buffer + i), sizeof(struct discHdr));
|
memcpy((buffer2 + cnt3), (buffer + i), sizeof(struct discHdr));
|
||||||
cnt2++;
|
cnt3++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (buffer2) {
|
||||||
free(buffer);
|
free(buffer);
|
||||||
buffer = buffer2;
|
buffer = buffer2;
|
||||||
buffer2 = NULL;
|
buffer2 = NULL;
|
||||||
cnt = cnt2;
|
} else {
|
||||||
|
memset(buffer, 0, len);
|
||||||
|
}
|
||||||
|
cnt = cnt3;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Settings.sort==pcount) {
|
if (Settings.sort==pcount) {
|
||||||
|
Loading…
Reference in New Issue
Block a user