Fix the "Waiting for your slow HDD" Timer-Bug (see Issue 850)

This commit is contained in:
ardi@ist-einmalig.de 2009-08-19 22:25:42 +00:00
parent fe0982758a
commit 88642ac01b

View File

@ -59,40 +59,39 @@ static void BootUpProblems()
bootimage.SetPosition(320-1.2*bootimage.GetWidth()/2, 240-1.2*bootimage.GetHeight()/2); bootimage.SetPosition(320-1.2*bootimage.GetWidth()/2, 240-1.2*bootimage.GetHeight()/2);
bootimage.SetScale(1.2); bootimage.SetScale(1.2);
u8 i = 30; time_t curtime;
while (i > 0) { time_t endtime = time(0) + 30;
do {
ret2 = IOS_ReloadIOS(249);
if (ret2 < 0) {
ret2 = IOS_ReloadIOS(222);
load_ehc_module();
if(ret2 <0) {
boottext.SetText("ERROR: cIOS could not be loaded!");
bootimage.Draw();
boottext.Draw();
Menu_Render();
sleep(5);
SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0);
}
}
ret2 = IOS_ReloadIOS(249); ret2 = WBFS_Init(WBFS_DEVICE_USB);
if (ret2 < 0) { if (ret2 >= 0) {
ret2 = IOS_ReloadIOS(222); boottext.SetText("Loading...");
load_ehc_module(); bootimage.Draw();
if(ret2 <0) { boottext.Draw();
boottext.SetText("ERROR: cIOS could not be loaded!"); Menu_Render();
bootimage.Draw(); break;
boottext.Draw(); }
Menu_Render(); curtime = time(0);
sleep(5); boottext.SetTextf("Waiting for your slow USB Device: %i secs...", int(endtime-curtime));
SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0); while(curtime == time(0)) {
} boottext.Draw();
} bootimage.Draw();
Menu_Render();
ret2 = WBFS_Init(WBFS_DEVICE_USB); }
if (ret2 >= 0) { } while((endtime-time(0)) > 0);
boottext.SetText("Loading...");
bootimage.Draw();
boottext.Draw();
Menu_Render();
break;
}
boottext.SetTextf("Waiting for your slow USB Device: %i secs...", i);
boottext.Draw();
bootimage.Draw();
Menu_Render();
sleep(1);
i--;
}
if(ret2 < 0) { if(ret2 < 0) {
boottext.SetText("ERROR: USB device could not be loaded!"); boottext.SetText("ERROR: USB device could not be loaded!");