-if in neek mode dont use nand emulator at all and also dont

shutdown devices on game boot
This commit is contained in:
fix94.1 2012-07-15 00:05:23 +00:00
parent d0ed0821f3
commit 742477d0cf
5 changed files with 20 additions and 30 deletions

View File

@ -99,7 +99,8 @@ PartitionHandle::~PartitionHandle()
UnMountAll();
//shutdown device
interface->shutdown();
if(!cIOSInfo::neek2o())
interface->shutdown();
}
bool PartitionHandle::IsMounted(int pos)

View File

@ -2005,7 +2005,7 @@ bool CMenu::_loadChannelList(void)
m_partRequest = m_cfg.getInt("NAND", "partition", 0);
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;
if(emuPartition < 0)
@ -2032,6 +2032,7 @@ bool CMenu::_loadChannelList(void)
Nand::Instance()->PreNandCfg(basepath, m_cfg.getBool("NAND", "miis_from_real", true));
first = false;
}
string nandpath = sfmt("%s:%s/", DeviceName[currentPartition], emuPath.empty() ? "" : emuPath.c_str());
if(!disable_emu)
{
@ -2049,14 +2050,12 @@ bool CMenu::_loadChannelList(void)
}
else
failed = false;
gprintf("nandpath = %s\n", nandpath.c_str());
}
if(!DeviceHandler::Instance()->IsInserted(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)
{
m_gameList.LoadChannels(disable_emu ? "" : nandpath, 0, m_cfg.getString("NAND", "lastlanguage", "EN").c_str());

View File

@ -5,6 +5,7 @@
#include "gecko.h"
#include "defines.h"
#include "nand.hpp"
#include "cios.hpp"
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();
m_btnMgr.setText(m_config4LblReturnToVal, channelName);

View File

@ -174,7 +174,7 @@ void CMenu::_showMain(void)
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();
}
@ -465,7 +465,7 @@ int CMenu::main(void)
_showMain();
continue;
}
else
else if(!cIOSInfo::neek2o())
{
m_cfg.setBool("NAND", "disable", !m_cfg.getBool("NAND", "disable", true));
gprintf("EmuNand is %s\n", m_cfg.getBool("NAND", "disable", true) ? "Disabled" : "Enabled");
@ -634,7 +634,7 @@ int CMenu::main(void)
SourceMenuTimeout = 0;
bool block = m_current_view == COVERFLOW_CHANNEL && m_cfg.getBool("NAND", "disable", true);
char *partition;
if(!block)
if(!block && !cIOSInfo::neek2o())
{
_showWaitMessage();
_hideMain();
@ -674,12 +674,9 @@ int CMenu::main(void)
snprintf(gui_name, sizeof(gui_name), "%s [%s]", _domainFromView(),partition);
m_btnMgr.setText(m_mainLblNotice, (string)gui_name);
m_btnMgr.show(m_mainLblNotice);
if(!block)
{
_loadList();
_showMain();
_initCF();
}
_loadList();
_showMain();
_initCF();
}
else if(!enable_wmote_roll)
{

View File

@ -199,22 +199,15 @@ void CMenu::_enableNandEmu(bool fromconfig)
_cfNeedsUpdate();
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;
if(!cIOSInfo::neek2o())
{
Nand::Instance()->Disable_Emu();
iosinfo_t * iosInfo = cIOSInfo::GetInfo(mainIOS);
if (iosInfo->version > 6)
isD2XnewerThanV6 = true;
if(m_current_view == COVERFLOW_CHANNEL && !m_cfg.getBool("NAND", "disable", true) && !m_tempView)
Nand::Instance()->Enable_Emu();
}
else
{
Nand::Instance()->Disable_Emu();
iosinfo_t * iosInfo = cIOSInfo::GetInfo(mainIOS);
if (iosInfo->version > 6)
isD2XnewerThanV6 = true;
}
if(m_current_view == COVERFLOW_CHANNEL && !m_cfg.getBool("NAND", "disable", true) && !m_tempView)
Nand::Instance()->Enable_Emu();
u8 limiter = 0;
s8 direction = m_btnMgr.selected(m_configBtnPartitionP) ? 1 : -1;
if (!fromconfig)
@ -230,7 +223,6 @@ void CMenu::_enableNandEmu(bool fromconfig)
if (limiter > 10) break;
limiter++;
}
gprintf("Next item: %s\n", DeviceName[currentPartition]);
if(m_tempView)
m_cfg.setInt("GAMES", "savepartition", currentPartition);