mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Fix profile load when GLideN64.ini doesn't exist
This commit is contained in:
parent
32dbfe1d1f
commit
d00cf9f214
|
@ -163,18 +163,17 @@ void loadSettings(const char * _strIniFolder)
|
||||||
settings.beginGroup(strUserProfile);
|
settings.beginGroup(strUserProfile);
|
||||||
writeSettings(_strIniFolder);
|
writeSettings(_strIniFolder);
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
} else {
|
|
||||||
std::string profile = settings.value("profile", strUserProfile).toString();
|
|
||||||
GlSettings::sections childGroups = settings.childGroups();
|
|
||||||
if (childGroups.find(profile.c_str()) != childGroups.end()) {
|
|
||||||
settings.beginGroup(profile.c_str());
|
|
||||||
_loadSettings(settings);
|
|
||||||
settings.endGroup();
|
|
||||||
} else
|
|
||||||
rewriteSettings = true;
|
|
||||||
if (config.version != CONFIG_VERSION_CURRENT)
|
|
||||||
rewriteSettings = true;
|
|
||||||
}
|
}
|
||||||
|
std::string profile = settings.value("profile", strUserProfile).toString();
|
||||||
|
GlSettings::sections childGroups = settings.childGroups();
|
||||||
|
if (childGroups.find(profile.c_str()) != childGroups.end()) {
|
||||||
|
settings.beginGroup(profile.c_str());
|
||||||
|
_loadSettings(settings);
|
||||||
|
settings.endGroup();
|
||||||
|
} else
|
||||||
|
rewriteSettings = true;
|
||||||
|
if (config.version != CONFIG_VERSION_CURRENT)
|
||||||
|
rewriteSettings = true;
|
||||||
}
|
}
|
||||||
if (rewriteSettings) {
|
if (rewriteSettings) {
|
||||||
// Keep settings up-to-date
|
// Keep settings up-to-date
|
||||||
|
|
Loading…
Reference in New Issue
Block a user