mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-27 21:54:15 +01:00
-fixed booting wiiflow without sd card inserted
This commit is contained in:
parent
7ef23f96e1
commit
8dc9d535b4
@ -98,17 +98,14 @@ int main(int argc, char **argv)
|
|||||||
const DISC_INTERFACE *handle = DeviceHandler::GetUSB0Interface();
|
const DISC_INTERFACE *handle = DeviceHandler::GetUSB0Interface();
|
||||||
bool deviceAvailable = false;
|
bool deviceAvailable = false;
|
||||||
u8 timeout = time(NULL);
|
u8 timeout = time(NULL);
|
||||||
while(!deviceAvailable && time(NULL) - timeout < 20)
|
while(time(NULL) - timeout < 20)
|
||||||
{
|
{
|
||||||
deviceAvailable = (handle->startup() && handle->isInserted());
|
if(handle->startup() && handle->isInserted())
|
||||||
if(deviceAvailable)
|
|
||||||
break;
|
break;
|
||||||
usleep(50000);
|
usleep(50000);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
DeviceHandler::Instance()->MountAll();
|
DeviceHandler::Instance()->MountAll();
|
||||||
if(DeviceHandler::Instance()->IsInserted(SD))
|
|
||||||
deviceAvailable = true;
|
|
||||||
vid.waitMessage(0.15f);
|
vid.waitMessage(0.15f);
|
||||||
bool dipOK = Disc_Init() >= 0;
|
bool dipOK = Disc_Init() >= 0;
|
||||||
|
|
||||||
@ -116,6 +113,8 @@ int main(int argc, char **argv)
|
|||||||
mainMenu->init();
|
mainMenu->init();
|
||||||
if(CurrentIOS.Version != mainIOS && useMainIOS)
|
if(CurrentIOS.Version != mainIOS && useMainIOS)
|
||||||
iosOK = loadIOS(mainIOS, false, false) && CustomIOS(CurrentIOS.Type);
|
iosOK = loadIOS(mainIOS, false, false) && CustomIOS(CurrentIOS.Type);
|
||||||
|
if(DeviceHandler::Instance()->IsInserted(SD) || DeviceHandler::Instance()->IsInserted(USB1))
|
||||||
|
deviceAvailable = true;
|
||||||
|
|
||||||
if(!iosOK)
|
if(!iosOK)
|
||||||
mainMenu->terror("errboot1", L"No cIOS found!\ncIOS d2x 249 base 56 and 250 base 57 are enough for all your games.");
|
mainMenu->terror("errboot1", L"No cIOS found!\ncIOS d2x 249 base 56 and 250 base 57 are enough for all your games.");
|
||||||
|
Loading…
Reference in New Issue
Block a user