mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 21:07:42 +00:00
CVar: Ensure m_wasDeserialized set in deferred & command line cases
This commit is contained in:
@@ -97,7 +97,11 @@ void CVarManager::deserialize(CVar* cvar) {
|
||||
if (cvar->isBoolean() && val.empty()) {
|
||||
// We were deferred without a value, assume true
|
||||
cvar->fromBoolean(true);
|
||||
} else if (!val.empty() && cvar->fromLiteralToType(val)) {
|
||||
cvar->m_wasDeserialized = true;
|
||||
return;
|
||||
}
|
||||
if (!val.empty() && cvar->fromLiteralToType(val)) {
|
||||
cvar->m_wasDeserialized = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -327,6 +331,7 @@ void CVarManager::parseCommandLine(const std::vector<SystemString>& args) {
|
||||
} else if (!cvarValue.empty()) {
|
||||
cv->fromLiteralToType(cvarValue);
|
||||
}
|
||||
cv->m_wasDeserialized = true;
|
||||
athena::utility::tolower(cvarName);
|
||||
if (developerName == cvarName)
|
||||
/* Make sure we're not overriding developer mode when we restore */
|
||||
|
||||
Reference in New Issue
Block a user