-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(); UnMountAll();
//shutdown device //shutdown device
interface->shutdown(); if(!cIOSInfo::neek2o())
interface->shutdown();
} }
bool PartitionHandle::IsMounted(int pos) bool PartitionHandle::IsMounted(int pos)

View File

@ -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());

View File

@ -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);

View File

@ -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,12 +674,9 @@ 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();
{ _showMain();
_loadList(); _initCF();
_showMain();
_initCF();
}
} }
else if(!enable_wmote_roll) else if(!enable_wmote_roll)
{ {

View File

@ -198,23 +198,16 @@ 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();
{ iosinfo_t * iosInfo = cIOSInfo::GetInfo(mainIOS);
Nand::Instance()->Disable_Emu(); if (iosInfo->version > 6)
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
{
isD2XnewerThanV6 = true; isD2XnewerThanV6 = true;
} if(m_current_view == COVERFLOW_CHANNEL && !m_cfg.getBool("NAND", "disable", true) && !m_tempView)
Nand::Instance()->Enable_Emu();
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);