Merge pull request #4119 from mbc07/drop-4.0-ini-hack

Drop some INI hacks from 4.0-era
This commit is contained in:
shuffle2 2016-10-02 21:23:50 -07:00 committed by GitHub
commit 39f75d64d6
1 changed files with 3 additions and 29 deletions

View File

@ -144,7 +144,7 @@ void SConfig::SaveInterfaceSettings(IniFile& ini)
interface->Set("ShowLogWindow", m_InterfaceLogWindow); interface->Set("ShowLogWindow", m_InterfaceLogWindow);
interface->Set("ShowLogConfigWindow", m_InterfaceLogConfigWindow); interface->Set("ShowLogConfigWindow", m_InterfaceLogConfigWindow);
interface->Set("ExtendedFPSInfo", m_InterfaceExtendedFPSInfo); interface->Set("ExtendedFPSInfo", m_InterfaceExtendedFPSInfo);
interface->Set("ThemeName40", theme_name); interface->Set("ThemeName", theme_name);
interface->Set("PauseOnFocusLost", m_PauseOnFocusLost); interface->Set("PauseOnFocusLost", m_PauseOnFocusLost);
} }
@ -355,34 +355,8 @@ void SConfig::LoadGeneralSettings(IniFile& ini)
m_ISOFolder.push_back(std::move(tmpPath)); m_ISOFolder.push_back(std::move(tmpPath));
} }
} }
// Check for old file path (Changed in 4.0-4003)
// This can probably be removed after 5.0 stable is launched
else if (general->Get("GCMPathes", &numISOPaths, 0))
{
for (int i = 0; i < numISOPaths; i++)
{
std::string tmpPath;
general->Get(StringFromFormat("GCMPath%i", i), &tmpPath, "");
bool found = false;
for (size_t j = 0; j < m_ISOFolder.size(); ++j)
{
if (m_ISOFolder[j] == tmpPath)
{
found = true;
break;
}
}
if (!found)
m_ISOFolder.push_back(std::move(tmpPath));
}
}
if (!general->Get("RecursiveISOPaths", &m_RecursiveISOFolder, false))
{
// Check for old name
general->Get("RecursiveGCMPaths", &m_RecursiveISOFolder, false);
}
general->Get("RecursiveISOPaths", &m_RecursiveISOFolder, false);
general->Get("NANDRootPath", &m_NANDPath); general->Get("NANDRootPath", &m_NANDPath);
File::SetUserPath(D_WIIROOT_IDX, m_NANDPath); File::SetUserPath(D_WIIROOT_IDX, m_NANDPath);
general->Get("DumpPath", &m_DumpPath); general->Get("DumpPath", &m_DumpPath);
@ -411,7 +385,7 @@ void SConfig::LoadInterfaceSettings(IniFile& ini)
interface->Get("ShowLogWindow", &m_InterfaceLogWindow, false); interface->Get("ShowLogWindow", &m_InterfaceLogWindow, false);
interface->Get("ShowLogConfigWindow", &m_InterfaceLogConfigWindow, false); interface->Get("ShowLogConfigWindow", &m_InterfaceLogConfigWindow, false);
interface->Get("ExtendedFPSInfo", &m_InterfaceExtendedFPSInfo, false); interface->Get("ExtendedFPSInfo", &m_InterfaceExtendedFPSInfo, false);
interface->Get("ThemeName40", &theme_name, DEFAULT_THEME_DIR); interface->Get("ThemeName", &theme_name, DEFAULT_THEME_DIR);
interface->Get("PauseOnFocusLost", &m_PauseOnFocusLost, false); interface->Get("PauseOnFocusLost", &m_PauseOnFocusLost, false);
} }