From 45818906509076339ff3174d1c0f62c0afcba919 Mon Sep 17 00:00:00 2001 From: dimok321 <15055714+dimok789@users.noreply.github.com> Date: Fri, 15 May 2009 20:35:08 +0000 Subject: [PATCH] *Fixed install bug when 0 Games are on the HDD --- source/fatmounter.c | 2 +- source/libwiigui/gui_gamebrowser.cpp | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/source/fatmounter.c b/source/fatmounter.c index c2fc24a0..a6c17dc1 100644 --- a/source/fatmounter.c +++ b/source/fatmounter.c @@ -13,7 +13,7 @@ int USBDevice_Init() //right now only mounts first partition and only under IOS36 __io_usbstorage.startup(); - if (fatMountSimple("USB", &__io_usbstorage, 0, CACHE)) { + if (fatMount("USB", &__io_usbstorage, 0, CACHE)) { return 1; } diff --git a/source/libwiigui/gui_gamebrowser.cpp b/source/libwiigui/gui_gamebrowser.cpp index 37df06ef..b95ce11c 100644 --- a/source/libwiigui/gui_gamebrowser.cpp +++ b/source/libwiigui/gui_gamebrowser.cpp @@ -26,6 +26,7 @@ GuiGameBrowser::GuiGameBrowser(int w, int h, struct discHdr * l, int gameCnt, co { width = w; height = h; + if (gameCnt == 0) gameCnt = 1; this->gameCnt = gameCnt; gameList = l; pagesize = (gameCnt > THEME.pagesize) ? THEME.pagesize : gameCnt; @@ -137,9 +138,9 @@ GuiGameBrowser::GuiGameBrowser(int w, int h, struct discHdr * l, int gameCnt, co gameTxt[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); gameTxt[i]->SetPosition(24,0); char* pch; - + pch=strrchr((buffer),'_'); - + if (pch!=NULL){gameTxt[i]->SetPosition(24, 15);} else {gameTxt[i]->SetPosition(24, 0);} @@ -324,7 +325,7 @@ void GuiGameBrowser::Update(GuiTrigger * t) // scrolldelay affects how fast the list scrolls // when the arrows are clicked float scrolldelay = 3.5; - + if (scrollbaron == 1) { // update the location of the scroll box based on the position in the option list arrowUpBtn->Update(t); @@ -358,9 +359,9 @@ void GuiGameBrowser::Update(GuiTrigger * t) gameTxt[i]->SetText(buffer); char* pch; - + pch=strrchr((buffer),'_'); - + if (pch!=NULL){gameTxt[i]->SetPosition(24, 15);} else {gameTxt[i]->SetPosition(24, 0);} gameIndex[i] = next;