- fix to prevent SD Only to auto switch to on if you temporarily disconnect your USB drive. meaning SD only will stay off.

- also sd only fix for users with old versions of wfl switching to newer version that includes sd only.
This commit is contained in:
Fledge68 2019-05-15 10:10:21 -05:00
parent 331d1f1b31
commit 1fcf25a397
3 changed files with 8 additions and 9 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 MiB

After

Width:  |  Height:  |  Size: 3.4 MiB

View File

@ -58,6 +58,13 @@ bool isUsingUSB() {
return true;
}
/* if sd_only is false, then we're using USB */
if(!m_cfg.getBool("general", "sd_only", true))
{
// sd_only is false, so assuming we're using USB.
return true;
}
/* If any of the sections have partition set > 0, we're on USB */
const char *domains[] = {WII_DOMAIN, GC_DOMAIN, CHANNEL_DOMAIN, PLUGIN_DOMAIN, HOMEBREW_DOMAIN};
for(int i = 0; i < 5; i++)
@ -68,14 +75,6 @@ bool isUsingUSB() {
return true;
}
}
/* if sd_only is false, then we're using USB */
if(!m_cfg.getBool("general", "sd_only", true))
{
// sd_only is false, so assuming we're using USB.
return true;
}
gprintf("using SD only, no need for USB mounting.\n");
return false;
}

View File

@ -163,7 +163,7 @@ bool CMenu::init()
_netInit();
/* Set SD only to off if any usb device is attached and format is FAT, NTFS, WBFS, or LINUX */
m_cfg.getBool("GENERAL", "sd_only", true);// will only set it true if this doesn't already exist
m_cfg.setBool("GENERAL", "sd_only", true);
for(int i = USB1; i <= USB8; i++)
{
if(DeviceHandle.IsInserted(i) && DeviceHandle.GetFSType(i) >= 0)