This commit is contained in:
parent
d9726f2ce2
commit
fcc228ab8d
|
@ -45,44 +45,6 @@ void Terminate()
|
||||||
if (ShutdownRequested) ShutdownWii();
|
if (ShutdownRequested) ShutdownWii();
|
||||||
else if (ResetRequested) RestartHomebrewChannel();
|
else if (ResetRequested) RestartHomebrewChannel();
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool FindIOS(u32 ios)
|
|
||||||
{
|
|
||||||
s32 ret;
|
|
||||||
u32 n;
|
|
||||||
|
|
||||||
u64 *titles = NULL;
|
|
||||||
u32 num_titles=0;
|
|
||||||
|
|
||||||
ret = ES_GetNumTitles(&num_titles);
|
|
||||||
if (ret < 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(num_titles < 1)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
titles = (u64 *)memalign(32, num_titles * sizeof(u64) + 32);
|
|
||||||
if (!titles)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
ret = ES_GetTitles(titles, num_titles);
|
|
||||||
if (ret < 0)
|
|
||||||
{
|
|
||||||
free(titles);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
for(n=0; n < num_titles; n++)
|
|
||||||
{
|
|
||||||
if((titles[n] & 0xFFFFFFFF)==ios)
|
|
||||||
{
|
|
||||||
free(titles);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
free(titles);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Do initialisation which has to be done first for the console to work */
|
/* Do initialisation which has to be done first for the console to work */
|
||||||
|
@ -91,14 +53,10 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
#ifdef HW_RVL
|
#ifdef HW_RVL
|
||||||
u32 version = IOS_GetVersion();
|
u32 version = IOS_GetVersion();
|
||||||
|
s32 preferred = IOS_GetPreferredVersion();
|
||||||
|
|
||||||
if(version != 58)
|
if(preferred > 0 && version != (u32)preferred)
|
||||||
{
|
IOS_ReloadIOS(preferred);
|
||||||
if(FindIOS(58))
|
|
||||||
IOS_ReloadIOS(58);
|
|
||||||
else if((version < 61 || version >= 200) && FindIOS(61))
|
|
||||||
IOS_ReloadIOS(61);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Wii Power/Reset buttons
|
// Wii Power/Reset buttons
|
||||||
WPAD_Init();
|
WPAD_Init();
|
||||||
|
|
Reference in a new issue