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