From 4f1d74b2e183fb19f1e0bac4b9935baa7a9c359d Mon Sep 17 00:00:00 2001 From: Stevoisiak Date: Tue, 17 Mar 2015 14:21:12 -0400 Subject: [PATCH] Check for GCMPathes if ISOPaths is not found The name of the settings were changed in 4.0-4003 with PR #1264. --- Source/Core/Core/ConfigManager.cpp | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/ConfigManager.cpp b/Source/Core/Core/ConfigManager.cpp index 6fc09c46d5..1695df9b56 100644 --- a/Source/Core/Core/ConfigManager.cpp +++ b/Source/Core/Core/ConfigManager.cpp @@ -434,8 +434,33 @@ void SConfig::LoadGeneralSettings(IniFile& ini) 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 (int j = 0; j < m_ISOFolder.size(); ++j) + { + if (m_ISOFolder[j] == tmpPath) + { + found = true; + break; + } + } + if (!found) + m_ISOFolder.push_back(std::move(tmpPath)); + } + } - general->Get("RecursiveISOPaths", &m_RecursiveISOFolder, false); + if (!general->Get("RecursiveISOPaths", &m_RecursiveISOFolder, false)) + { + // Check for old name + general->Get("RecursiveGCMPaths", &m_RecursiveISOFolder, false); + } general->Get("NANDRootPath", &m_NANDPath); File::SetUserPath(D_WIIROOT_IDX, m_NANDPath);