*Fixed for some HDDs GameList/Windows not loading.

This commit is contained in:
dimok321 2009-06-20 11:11:07 +00:00
parent 63a5de42ca
commit e228da697f

View File

@ -1661,15 +1661,15 @@ static int MenuCheck()
int menu = MENU_NONE; int menu = MENU_NONE;
int i = 0; int i = 0;
int choice; int choice;
s32 ret2; s32 ret2, wbfsinit;
OptionList options; OptionList options;
options.length = i; options.length = i;
partitionEntry partitions[MAX_PARTITIONS]; partitionEntry partitions[MAX_PARTITIONS];
VIDEO_WaitVSync (); VIDEO_WaitVSync ();
ret2 = WBFS_Init(WBFS_DEVICE_USB); wbfsinit = WBFS_Init(WBFS_DEVICE_USB);
if (ret2 < 0) if (wbfsinit < 0)
{ {
ret2 = WindowPrompt(LANGUAGE.NoUSBDevicefound, ret2 = WindowPrompt(LANGUAGE.NoUSBDevicefound,
LANGUAGE.Doyouwanttoretryfor30secs, LANGUAGE.Doyouwanttoretryfor30secs,
@ -1692,11 +1692,11 @@ static int MenuCheck()
Wpad_Init(); Wpad_Init();
WPAD_SetDataFormat(WPAD_CHAN_ALL,WPAD_FMT_BTNS_ACC_IR); WPAD_SetDataFormat(WPAD_CHAN_ALL,WPAD_FMT_BTNS_ACC_IR);
WPAD_SetVRes(WPAD_CHAN_ALL, screenwidth, screenheight); WPAD_SetVRes(WPAD_CHAN_ALL, screenwidth, screenheight);
if (ret2 < 0) {
WindowPrompt (LANGUAGE.Error,LANGUAGE.USBDevicenotfound, LANGUAGE.ok, 0,0,0);
Sys_LoadMenu();
}
} }
if (ret2 < 0) {
WindowPrompt (LANGUAGE.Error,LANGUAGE.USBDevicenotfound, LANGUAGE.ok, 0,0,0);
Sys_LoadMenu();
}
ret2 = Disc_Init(); ret2 = Disc_Init();
if (ret2 < 0) { if (ret2 < 0) {
@ -1726,19 +1726,28 @@ static int MenuCheck()
} }
} }
SDCard_Init();
USBDevice_Init();
if(shutdown == 1) if(shutdown == 1)
Sys_Shutdown(); Sys_Shutdown();
if(reset == 1) if(reset == 1)
Sys_Reboot(); Sys_Reboot();
if(wbfsinit < 0) {
sleep(1);
}
//Spieleliste laden //Spieleliste laden
__Menu_GetEntries(); __Menu_GetEntries();
if(menu == MENU_NONE) if(menu == MENU_NONE)
menu = MENU_DISCLIST; menu = MENU_DISCLIST;
//for HDDs with issues
if(wbfsinit < 0) {
sleep(1);
USBDevice_Init();
SDCard_Init();
}
return menu; return menu;
} }
@ -1751,8 +1760,6 @@ int MainMenu(int menu)
int currentMenu = menu; int currentMenu = menu;
char imgPath[100]; char imgPath[100];
#ifdef HW_RVL #ifdef HW_RVL
snprintf(imgPath, sizeof(imgPath), "%splayer1_point.png", CFG.theme_path); snprintf(imgPath, sizeof(imgPath), "%splayer1_point.png", CFG.theme_path);
pointer[0] = new GuiImageData(imgPath, player1_point_png); pointer[0] = new GuiImageData(imgPath, player1_point_png);