mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-12-25 03:11:58 +01:00
-if in neek mode dont use nand emulator at all and also dont
shutdown devices on game boot
This commit is contained in:
parent
d0ed0821f3
commit
742477d0cf
@ -99,6 +99,7 @@ PartitionHandle::~PartitionHandle()
|
|||||||
UnMountAll();
|
UnMountAll();
|
||||||
|
|
||||||
//shutdown device
|
//shutdown device
|
||||||
|
if(!cIOSInfo::neek2o())
|
||||||
interface->shutdown();
|
interface->shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2005,7 +2005,7 @@ bool CMenu::_loadChannelList(void)
|
|||||||
m_partRequest = m_cfg.getInt("NAND", "partition", 0);
|
m_partRequest = m_cfg.getInt("NAND", "partition", 0);
|
||||||
int emuPartition = _FindEmuPart(&emuPath, m_partRequest, false);
|
int emuPartition = _FindEmuPart(&emuPath, m_partRequest, false);
|
||||||
|
|
||||||
bool disable_emu = m_cfg.getBool("NAND", "disable", true);
|
bool disable_emu = (m_cfg.getBool("NAND", "disable", true) || cIOSInfo::neek2o());
|
||||||
static bool last_emu_state = disable_emu;
|
static bool last_emu_state = disable_emu;
|
||||||
|
|
||||||
if(emuPartition < 0)
|
if(emuPartition < 0)
|
||||||
@ -2032,6 +2032,7 @@ bool CMenu::_loadChannelList(void)
|
|||||||
Nand::Instance()->PreNandCfg(basepath, m_cfg.getBool("NAND", "miis_from_real", true));
|
Nand::Instance()->PreNandCfg(basepath, m_cfg.getBool("NAND", "miis_from_real", true));
|
||||||
first = false;
|
first = false;
|
||||||
}
|
}
|
||||||
|
string nandpath = sfmt("%s:%s/", DeviceName[currentPartition], emuPath.empty() ? "" : emuPath.c_str());
|
||||||
|
|
||||||
if(!disable_emu)
|
if(!disable_emu)
|
||||||
{
|
{
|
||||||
@ -2049,14 +2050,12 @@ bool CMenu::_loadChannelList(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
failed = false;
|
failed = false;
|
||||||
|
gprintf("nandpath = %s\n", nandpath.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!DeviceHandler::Instance()->IsInserted(currentPartition))
|
if(!DeviceHandler::Instance()->IsInserted(currentPartition))
|
||||||
DeviceHandler::Instance()->Mount(currentPartition);
|
DeviceHandler::Instance()->Mount(currentPartition);
|
||||||
|
|
||||||
string nandpath = sfmt("%s:%s/", DeviceName[currentPartition], emuPath.empty() ? "" : emuPath.c_str());
|
|
||||||
gprintf("nandpath = %s\n", nandpath.c_str());
|
|
||||||
|
|
||||||
if(!failed)
|
if(!failed)
|
||||||
{
|
{
|
||||||
m_gameList.LoadChannels(disable_emu ? "" : nandpath, 0, m_cfg.getString("NAND", "lastlanguage", "EN").c_str());
|
m_gameList.LoadChannels(disable_emu ? "" : nandpath, 0, m_cfg.getString("NAND", "lastlanguage", "EN").c_str());
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include "gecko.h"
|
#include "gecko.h"
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
#include "nand.hpp"
|
#include "nand.hpp"
|
||||||
|
#include "cios.hpp"
|
||||||
|
|
||||||
static const int g_curPage = 4;
|
static const int g_curPage = 4;
|
||||||
|
|
||||||
@ -97,7 +98,7 @@ void CMenu::_showConfig4(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_current_view == COVERFLOW_CHANNEL && m_cfg.getInt("NAND", "emulation", 0) > 0)
|
if(!cIOSInfo::neek2o() && m_current_view == COVERFLOW_CHANNEL && m_cfg.getInt("NAND", "emulation", 0) > 0)
|
||||||
Nand::Instance()->Enable_Emu();
|
Nand::Instance()->Enable_Emu();
|
||||||
|
|
||||||
m_btnMgr.setText(m_config4LblReturnToVal, channelName);
|
m_btnMgr.setText(m_config4LblReturnToVal, channelName);
|
||||||
|
@ -174,7 +174,7 @@ void CMenu::_showMain(void)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(m_current_view == COVERFLOW_CHANNEL && !m_cfg.getBool("NAND", "disable", true))
|
else if(!cIOSInfo::neek2o() && m_current_view == COVERFLOW_CHANNEL && !m_cfg.getBool("NAND", "disable", true))
|
||||||
Nand::Instance()->Enable_Emu();
|
Nand::Instance()->Enable_Emu();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -465,7 +465,7 @@ int CMenu::main(void)
|
|||||||
_showMain();
|
_showMain();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else
|
else if(!cIOSInfo::neek2o())
|
||||||
{
|
{
|
||||||
m_cfg.setBool("NAND", "disable", !m_cfg.getBool("NAND", "disable", true));
|
m_cfg.setBool("NAND", "disable", !m_cfg.getBool("NAND", "disable", true));
|
||||||
gprintf("EmuNand is %s\n", m_cfg.getBool("NAND", "disable", true) ? "Disabled" : "Enabled");
|
gprintf("EmuNand is %s\n", m_cfg.getBool("NAND", "disable", true) ? "Disabled" : "Enabled");
|
||||||
@ -634,7 +634,7 @@ int CMenu::main(void)
|
|||||||
SourceMenuTimeout = 0;
|
SourceMenuTimeout = 0;
|
||||||
bool block = m_current_view == COVERFLOW_CHANNEL && m_cfg.getBool("NAND", "disable", true);
|
bool block = m_current_view == COVERFLOW_CHANNEL && m_cfg.getBool("NAND", "disable", true);
|
||||||
char *partition;
|
char *partition;
|
||||||
if(!block)
|
if(!block && !cIOSInfo::neek2o())
|
||||||
{
|
{
|
||||||
_showWaitMessage();
|
_showWaitMessage();
|
||||||
_hideMain();
|
_hideMain();
|
||||||
@ -674,13 +674,10 @@ int CMenu::main(void)
|
|||||||
snprintf(gui_name, sizeof(gui_name), "%s [%s]", _domainFromView(),partition);
|
snprintf(gui_name, sizeof(gui_name), "%s [%s]", _domainFromView(),partition);
|
||||||
m_btnMgr.setText(m_mainLblNotice, (string)gui_name);
|
m_btnMgr.setText(m_mainLblNotice, (string)gui_name);
|
||||||
m_btnMgr.show(m_mainLblNotice);
|
m_btnMgr.show(m_mainLblNotice);
|
||||||
if(!block)
|
|
||||||
{
|
|
||||||
_loadList();
|
_loadList();
|
||||||
_showMain();
|
_showMain();
|
||||||
_initCF();
|
_initCF();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else if(!enable_wmote_roll)
|
else if(!enable_wmote_roll)
|
||||||
{
|
{
|
||||||
if(!SourceMenuTimeout)
|
if(!SourceMenuTimeout)
|
||||||
|
@ -199,22 +199,15 @@ void CMenu::_enableNandEmu(bool fromconfig)
|
|||||||
_cfNeedsUpdate();
|
_cfNeedsUpdate();
|
||||||
bool disable = m_cfg.getBool("NAND", "disable", true) && m_current_view == COVERFLOW_CHANNEL && !m_tempView;
|
bool disable = m_cfg.getBool("NAND", "disable", true) && m_current_view == COVERFLOW_CHANNEL && !m_tempView;
|
||||||
|
|
||||||
if(!disable || cIOSInfo::neek2o())
|
if(!disable && !cIOSInfo::neek2o())
|
||||||
{
|
{
|
||||||
bool isD2XnewerThanV6 = false;
|
bool isD2XnewerThanV6 = false;
|
||||||
if(!cIOSInfo::neek2o())
|
|
||||||
{
|
|
||||||
Nand::Instance()->Disable_Emu();
|
Nand::Instance()->Disable_Emu();
|
||||||
iosinfo_t * iosInfo = cIOSInfo::GetInfo(mainIOS);
|
iosinfo_t * iosInfo = cIOSInfo::GetInfo(mainIOS);
|
||||||
if (iosInfo->version > 6)
|
if (iosInfo->version > 6)
|
||||||
isD2XnewerThanV6 = true;
|
isD2XnewerThanV6 = true;
|
||||||
if(m_current_view == COVERFLOW_CHANNEL && !m_cfg.getBool("NAND", "disable", true) && !m_tempView)
|
if(m_current_view == COVERFLOW_CHANNEL && !m_cfg.getBool("NAND", "disable", true) && !m_tempView)
|
||||||
Nand::Instance()->Enable_Emu();
|
Nand::Instance()->Enable_Emu();
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
isD2XnewerThanV6 = true;
|
|
||||||
}
|
|
||||||
u8 limiter = 0;
|
u8 limiter = 0;
|
||||||
s8 direction = m_btnMgr.selected(m_configBtnPartitionP) ? 1 : -1;
|
s8 direction = m_btnMgr.selected(m_configBtnPartitionP) ? 1 : -1;
|
||||||
if (!fromconfig)
|
if (!fromconfig)
|
||||||
@ -230,7 +223,6 @@ void CMenu::_enableNandEmu(bool fromconfig)
|
|||||||
if (limiter > 10) break;
|
if (limiter > 10) break;
|
||||||
limiter++;
|
limiter++;
|
||||||
}
|
}
|
||||||
|
|
||||||
gprintf("Next item: %s\n", DeviceName[currentPartition]);
|
gprintf("Next item: %s\n", DeviceName[currentPartition]);
|
||||||
if(m_tempView)
|
if(m_tempView)
|
||||||
m_cfg.setInt("GAMES", "savepartition", currentPartition);
|
m_cfg.setInt("GAMES", "savepartition", currentPartition);
|
||||||
|
Loading…
Reference in New Issue
Block a user