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,9 +59,9 @@ 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); ret2 = IOS_ReloadIOS(249);
if (ret2 < 0) { if (ret2 < 0) {
ret2 = IOS_ReloadIOS(222); ret2 = IOS_ReloadIOS(222);
@ -84,15 +84,14 @@ static void BootUpProblems()
Menu_Render(); Menu_Render();
break; break;
} }
curtime = time(0);
boottext.SetTextf("Waiting for your slow USB Device: %i secs...", i); boottext.SetTextf("Waiting for your slow USB Device: %i secs...", int(endtime-curtime));
while(curtime == time(0)) {
boottext.Draw(); boottext.Draw();
bootimage.Draw(); bootimage.Draw();
Menu_Render(); Menu_Render();
sleep(1);
i--;
} }
} while((endtime-time(0)) > 0);
if(ret2 < 0) { if(ret2 < 0) {
boottext.SetText("ERROR: USB device could not be loaded!"); boottext.SetText("ERROR: USB device could not be loaded!");