mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2025-01-12 11:59:08 +01:00
-100% better looking auto IOS selection code, also fixed
a small bug in it which might cause some error in wiiflow
This commit is contained in:
parent
eb0b3e68de
commit
afc24fa9c5
@ -902,15 +902,19 @@ void CMenu::_launchChannel(dir_discHdr *hdr)
|
|||||||
IOS[1] = 56;
|
IOS[1] = 56;
|
||||||
IOS[2] = 57;
|
IOS[2] = 57;
|
||||||
bool found = false;
|
bool found = false;
|
||||||
for(u8 num = 0; !found && num < 4; num++)
|
for(u8 num = 0; num < 3; num++)
|
||||||
{
|
{
|
||||||
if(IOS[num] == 0) num++;
|
if(found)
|
||||||
for(CIOSItr itr = _installed_cios.begin(); !found && itr != _installed_cios.end(); itr++)
|
break;
|
||||||
|
if(IOS[num] == 0)
|
||||||
|
continue;
|
||||||
|
for(CIOSItr itr = _installed_cios.begin(); itr != _installed_cios.end(); itr++)
|
||||||
{
|
{
|
||||||
if(itr->second == IOS[num] || itr->first == IOS[num])
|
if(itr->second == IOS[num] || itr->first == IOS[num])
|
||||||
{
|
{
|
||||||
gameIOS = itr->first;
|
gameIOS = itr->first;
|
||||||
found = true;
|
found = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1198,15 +1202,19 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
|||||||
IOS[2] = 57;
|
IOS[2] = 57;
|
||||||
gprintf("Game requested IOS: %u\n", IOS[0]);
|
gprintf("Game requested IOS: %u\n", IOS[0]);
|
||||||
bool found = false;
|
bool found = false;
|
||||||
for(u8 num = 0; !found && num < 4; num++)
|
for(u8 num = 0; num < 3; num++)
|
||||||
{
|
{
|
||||||
if(IOS[num] == 0) num++;
|
if(found)
|
||||||
for(CIOSItr itr = _installed_cios.begin(); !found && itr != _installed_cios.end(); itr++)
|
break;
|
||||||
|
if(IOS[num] == 0)
|
||||||
|
continue;
|
||||||
|
for(CIOSItr itr = _installed_cios.begin(); itr != _installed_cios.end(); itr++)
|
||||||
{
|
{
|
||||||
if(itr->second == IOS[num])
|
if(itr->second == IOS[num] || itr->first == IOS[num])
|
||||||
{
|
{
|
||||||
gameIOS = itr->first;
|
gameIOS = itr->first;
|
||||||
found = true;
|
found = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user