mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-12-24 02:41:55 +01:00
-switched to more compatible neek check
-lets disable nand emu if we exit wiiflow -also disable nand emu if nand emu is disabled (d'oh!) -removed unneeded debug prints in neek mode
This commit is contained in:
parent
b484a8cb17
commit
0857cdde64
@ -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. */
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user