mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-01 00:55:06 +01:00
-more neek fixes (thanks skidau for testing)
This commit is contained in:
parent
9c27995a50
commit
a38287191b
@ -86,7 +86,8 @@ int main()
|
||||
}
|
||||
if(normalCFG.GameBootType == TYPE_WII_DISC)
|
||||
{
|
||||
Disc_SetUSB(NULL, false);
|
||||
if(CurrentIOS.Type != IOS_TYPE_NEEK2O)
|
||||
Disc_SetUSB(NULL, false);
|
||||
if(CurrentIOS.Type == IOS_TYPE_HERMES)
|
||||
Hermes_Disable_EHC();
|
||||
}
|
||||
|
@ -38,27 +38,33 @@ bool neek = false;
|
||||
u32 kernelSize = 0;
|
||||
void *Kernel = NULL;
|
||||
|
||||
void check_neek2o(void)
|
||||
{
|
||||
if(checked == true)
|
||||
return;
|
||||
checked = true;
|
||||
|
||||
s32 ESHandle = IOS_Open("/dev/es", 0);
|
||||
neek = (IOS_Ioctlv(ESHandle, 0xA2, 0, 0, NULL) == 0x666c6f77);
|
||||
IOS_Close(ESHandle);
|
||||
if(!neek)
|
||||
{
|
||||
s32 FSHandle = IOS_Open("/dev/fs", 0);
|
||||
neek = (IOS_Ioctlv(FSHandle, 0x21, 0, 0, NULL) == 0);
|
||||
IOS_Close(FSHandle);
|
||||
}
|
||||
if(!neek)
|
||||
{
|
||||
u32 num = 0;
|
||||
ISFS_Initialize();
|
||||
neek = (ISFS_ReadDir("/sneek", NULL, &num) == 0);
|
||||
ISFS_Deinitialize();
|
||||
}
|
||||
gprintf("WiiFlow is in %s mode\n", neek ? "neek2o" : "real nand");
|
||||
}
|
||||
|
||||
bool neek2o(void)
|
||||
{
|
||||
if(!checked)
|
||||
{
|
||||
s32 ESHandle = IOS_Open("/dev/es", 0);
|
||||
neek = IOS_Ioctlv(ESHandle, 0xA2, 0, 0, NULL) == 0x666c6f77;
|
||||
IOS_Close(ESHandle);
|
||||
if(!neek)
|
||||
{
|
||||
s32 FSHandle = IOS_Open("/dev/fs", 0);
|
||||
neek = IOS_Ioctlv(FSHandle, 0x21, 0, 0, NULL) == 0;
|
||||
IOS_Close(FSHandle);
|
||||
}
|
||||
if(!neek)
|
||||
{
|
||||
u32 num = 0;
|
||||
neek = (ISFS_ReadDir("/sneek", NULL, &num) == 0);
|
||||
}
|
||||
gprintf("WiiFlow is in %s mode\n", neek ? "neek2o" : "real nand");
|
||||
checked = true;
|
||||
}
|
||||
return neek;
|
||||
}
|
||||
|
||||
|
@ -27,6 +27,7 @@ extern "C" {
|
||||
|
||||
s32 Launch_nk(u64 TitleID, const char *nandpath, u64 ReturnTo);
|
||||
bool Load_Neek2o_Kernel();
|
||||
void check_neek2o(void);
|
||||
bool neek2o(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -63,6 +63,7 @@ int main(int argc, char **argv)
|
||||
else if(argv[i] != NULL && strcasestr(argv[i], "EMULATOR_MAGIC") != NULL)
|
||||
Emulator_boot = true;
|
||||
}
|
||||
check_neek2o();
|
||||
/* Init ISFS */
|
||||
if(neek2o() || Sys_DolphinMode())
|
||||
NandHandle.Init_ISFS();
|
||||
|
Loading…
Reference in New Issue
Block a user