-added source_menu autoboot feature to sourceflow

This commit is contained in:
fledge68 2013-10-21 15:32:37 +00:00
parent e3e7eb32df
commit e114de9f82

View File

@ -346,6 +346,40 @@ void CMenu::_sourceFlow()
}
}
m_sourceflow = false;
/* autoboot */
const char *autoboot = m_source.getString(btn_selected, "autoboot", "").c_str();
if(autoboot != NULL && autoboot[0] != '\0')
{
m_source_autoboot = true;
memset(&m_autoboot_hdr, 0, sizeof(dir_discHdr));
if(source == "emunand" || source == "realnand")
{
m_autoboot_hdr.type = TYPE_CHANNEL;
memcpy(m_autoboot_hdr.id, autoboot, 4);
}
else if(source == "wii")
{
m_autoboot_hdr.type = TYPE_WII_GAME;
memcpy(m_autoboot_hdr.id, autoboot, 6);
}
else if(source == "dml")
{
m_autoboot_hdr.type = TYPE_GC_GAME;
memcpy(m_autoboot_hdr.id, autoboot, 6);
}
else if(source == "homebrew")
{
m_autoboot_hdr.type = TYPE_HOMEBREW;
mbstowcs(m_autoboot_hdr.title, autoboot, 63);
}
else if(source == "plugin")
{
m_autoboot_hdr.type = TYPE_PLUGIN;
mbstowcs(m_autoboot_hdr.title, autoboot, 63);
}
else
m_source_autoboot = false;
}
}
bool CMenu::_Source()