mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
Fixed archiving of CVARs with default values
https://forum.zdoom.org/viewtopic.php?t=59701
This commit is contained in:
parent
4d4edcfbfb
commit
72831c9db7
1 changed files with 4 additions and 1 deletions
|
@ -1712,7 +1712,10 @@ void C_ArchiveCVars (FConfigFile *f, uint32_t filter)
|
|||
(CVAR_GLOBALCONFIG|CVAR_ARCHIVE|CVAR_MOD|CVAR_AUTO|CVAR_USERINFO|CVAR_SERVERINFO|CVAR_NOSAVE))
|
||||
== filter)
|
||||
{
|
||||
f->SetValueForKey(cvar->GetName(), cvar->SafeValue);
|
||||
const char *const value = (cvar->Flags & CVAR_ISDEFAULT)
|
||||
? cvar->GetGenericRep(CVAR_String).String
|
||||
: cvar->SafeValue.GetChars();
|
||||
f->SetValueForKey(cvar->GetName(), value);
|
||||
}
|
||||
cvar = cvar->m_Next;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue