1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-02 09:03:37 +00:00

Fix profile load when GLideN64.ini doesn't exist The logic looked incorrect here, but Qt loaded the profile correctly somehow. I tested this change and it doesn't change anything in the Qt version (which is good)

This commit is contained in:
oddMLan 2020-06-15 03:26:03 -07:00 committed by Sergey Lipskiy
parent d00cf9f214
commit 9bf9202c47

View File

@ -161,17 +161,16 @@ void loadSettings(const QString & _strIniFolder)
settings.beginGroup(strUserProfile);
writeSettings(_strIniFolder);
settings.endGroup();
} else {
QString profile = settings.value("profile", strUserProfile).toString();
if (settings.childGroups().indexOf(profile) >= 0) {
settings.beginGroup(profile);
_loadSettings(settings);
settings.endGroup();
} else
rewriteSettings = true;
if (config.version != CONFIG_VERSION_CURRENT)
rewriteSettings = true;
}
QString profile = settings.value("profile", strUserProfile).toString();
if (settings.childGroups().indexOf(profile) >= 0) {
settings.beginGroup(profile);
_loadSettings(settings);
settings.endGroup();
} else
rewriteSettings = true;
if (config.version != CONFIG_VERSION_CURRENT)
rewriteSettings = true;
}
if (rewriteSettings) {
// Keep settings up-to-date