mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-01 00:55:06 +01:00
-set "partition" option for emu nand to 0 (SD) by default to prevent crashes
This commit is contained in:
parent
cc76da97e1
commit
95a49ea97c
@ -187,7 +187,7 @@ void CMenu::init(void)
|
||||
}
|
||||
}
|
||||
Nand::Instance()->Init(m_cfg.getString("NAND", "path", "").c_str(),
|
||||
m_cfg.getInt("NAND", "partition", -1),
|
||||
m_cfg.getInt("NAND", "partition", 0),
|
||||
m_cfg.getBool("NAND", "disable", true)
|
||||
);
|
||||
|
||||
@ -222,7 +222,7 @@ void CMenu::init(void)
|
||||
const char *domain = _domainFromView();
|
||||
const char *checkDir = m_current_view == COVERFLOW_HOMEBREW ? HOMEBREW_DIR : GAMES_DIR;
|
||||
|
||||
u8 partition = m_cfg.getInt(domain, "partition", -1); //Auto find a valid partition and fix old ini partition settings.
|
||||
u8 partition = m_cfg.getInt(domain, "partition", 0); //Auto find a valid partition and fix old ini partition settings.
|
||||
if(m_current_view != COVERFLOW_CHANNEL && (partition > USB8 || !DeviceHandler::Instance()->IsInserted(partition)))
|
||||
{
|
||||
m_cfg.remove(domain, "partition");
|
||||
@ -237,6 +237,7 @@ void CMenu::init(void)
|
||||
&& ((m_current_view == COVERFLOW_USB && DeviceHandler::Instance()->GetFSType(i) == PART_FS_WBFS)
|
||||
|| stat(sfmt(checkDir, DeviceName[i]).c_str(), &dummy) == 0))
|
||||
{
|
||||
gprintf("Setting Emu NAND to Partition: %i\n",currentPartition);
|
||||
m_cfg.setInt(domain, "partition", i);
|
||||
break;
|
||||
}
|
||||
@ -1448,7 +1449,7 @@ const wstringEx CMenu::_fmt(const char *key, const wchar_t *def)
|
||||
|
||||
bool CMenu::_loadChannelList(void)
|
||||
{
|
||||
currentPartition = m_cfg.getInt("NAND", "partition", -1);
|
||||
currentPartition = m_cfg.getInt("NAND", "partition", 0);
|
||||
static u8 lastPartition = currentPartition;
|
||||
|
||||
bool disable_emu = m_cfg.getBool("NAND", "disable", true);
|
||||
|
@ -65,7 +65,7 @@ void CMenu::_showConfig(void)
|
||||
m_btnMgr.show(m_locked ? m_configBtnUnlock : m_configBtnSetCode);
|
||||
|
||||
bool disable = m_current_view == COVERFLOW_CHANNEL && m_cfg.getBool("NAND", "disable", true);
|
||||
char *partitionname = disable ? (char *)"NAND" : (char *)DeviceName[m_cfg.getInt(_domainFromView(), "partition", -1)];
|
||||
char *partitionname = disable ? (char *)"NAND" : (char *)DeviceName[m_cfg.getInt(_domainFromView(), "partition", 0)];
|
||||
|
||||
for(u8 i = 0; strncmp((const char *)&partitionname[i], "\0", 1) != 0; i++)
|
||||
partitionname[i] = toupper(partitionname[i]);
|
||||
|
@ -872,7 +872,7 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
||||
|
||||
int emuPartition = m_cfg.getInt("GAMES", "savepartition", -1);
|
||||
if(emuPartition == -1)
|
||||
emuPartition = m_cfg.getInt("NAND", "partition", -1);
|
||||
emuPartition = m_cfg.getInt("NAND", "partition", 0);
|
||||
|
||||
string emuPath = m_cfg.getString("GAMES", "savepath", m_cfg.getString("NAND", "path", ""));
|
||||
|
||||
|
@ -352,6 +352,7 @@ int CMenu::main(void)
|
||||
}
|
||||
|
||||
partition = (char *)DeviceName[currentPartition];
|
||||
gprintf("Setting Emu NAND to Partition: %i\n",currentPartition);
|
||||
m_cfg.setInt(_domainFromView(), "partition", currentPartition);
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user