diff --git a/source/loader/cios.cpp b/source/loader/cios.cpp index 70891fb4..d23dfab7 100644 --- a/source/loader/cios.cpp +++ b/source/loader/cios.cpp @@ -32,19 +32,25 @@ #include "cios.hpp" #include "utils.h" #include "mem2.hpp" +#include "gecko.h" #include "fs.h" #define ARRAY_SIZE(a) (sizeof a / sizeof a[0]) static u32 allowedBases[] = { 37, 38, 53, 55, 56, 57, 58 }; -static u32 boot2version = 0; +static bool checked = false; +static bool neek = false; bool cIOSInfo::neek2o(void) { - if(!boot2version) - ES_GetBoot2Version(&boot2version); - - return boot2version > 4 ? true : false; + if(!checked) + { + u32 num = 0; + neek = !(ISFS_ReadDir("/sneek", NULL, &num)); + gprintf("WiiFlow is in %s mode\n", neek ? "neek2o" : "real nand"); + checked = true; + } + return neek; } /* Check if the cIOS is a D2X. */ diff --git a/source/menu/menu.cpp b/source/menu/menu.cpp index 2264709f..365dbae7 100644 --- a/source/menu/menu.cpp +++ b/source/menu/menu.cpp @@ -2034,9 +2034,9 @@ bool CMenu::_loadChannelList(void) } string nandpath = sfmt("%s:%s/", DeviceName[currentPartition], emuPath.empty() ? "" : emuPath.c_str()); + Nand::Instance()->Disable_Emu(); if(!disable_emu) { - Nand::Instance()->Disable_Emu(); if(!DeviceHandler::Instance()->IsInserted(lastPartition)) DeviceHandler::Instance()->Mount(lastPartition); @@ -2287,7 +2287,8 @@ void CMenu::_load_installed_cioses() { if(cIOSInfo::D2X(slot, &base)) { - gprintf("Found base %u in slot %u\n", base, slot); + if(!cIOSInfo::neek2o()) + gprintf("Found base %u in slot %u\n", base, slot); _installed_cios[slot] = base; } } diff --git a/source/menu/menu_main.cpp b/source/menu/menu_main.cpp index 58a38998..feff816a 100644 --- a/source/menu/menu_main.cpp +++ b/source/menu/menu_main.cpp @@ -216,6 +216,7 @@ void CMenu::LoadView(void) void CMenu::exitHandler(int ExitTo) { gprintf("Exit WiiFlow called\n"); + Nand::Instance()->Disable_Emu(); if(!m_disable_exit) { m_exit = true;