mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-21 02:51:37 +00:00
save and restore config-only variables from proper sections
This commit is contained in:
parent
dd40d4f6f6
commit
dbc91da9c5
1 changed files with 20 additions and 1 deletions
|
@ -552,6 +552,12 @@ void FGameConfigFile::DoGameSetup (const char *gamename)
|
|||
ReadCVars (0);
|
||||
}
|
||||
|
||||
strncpy (subsection, "ConfigOnlyVariables", sublen);
|
||||
if (SetSection (section))
|
||||
{
|
||||
ReadCVars (0);
|
||||
}
|
||||
|
||||
strncpy (subsection, "ConsoleVariables", sublen);
|
||||
if (SetSection (section))
|
||||
{
|
||||
|
@ -644,6 +650,11 @@ void FGameConfigFile::DoModSetup(const char *gamename)
|
|||
{
|
||||
ReadCVars (CVAR_MOD|CVAR_SERVERINFO|CVAR_IGNORE);
|
||||
}
|
||||
mysnprintf(section, countof(section), "%s.ConfigOnlyVariables.Mod", gamename);
|
||||
if (SetSection (section))
|
||||
{
|
||||
ReadCVars (CVAR_MOD|CVAR_CONFIG_ONLY|CVAR_IGNORE);
|
||||
}
|
||||
// Signal that these sections should be rewritten when saving the config.
|
||||
bModSetup = true;
|
||||
}
|
||||
|
@ -732,7 +743,15 @@ void FGameConfigFile::ArchiveGameData (const char *gamename)
|
|||
strncpy (subsection, "ConfigOnlyVariables", sublen);
|
||||
SetSection (section, true);
|
||||
ClearCurrentSection ();
|
||||
C_ArchiveCVars (this, CVAR_ARCHIVE|CVAR_AUTO|CVAR_MOD|CVAR_CONFIG_ONLY);
|
||||
C_ArchiveCVars (this, CVAR_ARCHIVE|CVAR_AUTO|CVAR_CONFIG_ONLY);
|
||||
|
||||
if (bModSetup)
|
||||
{
|
||||
strncpy (subsection, "ConfigOnlyVariables.Mod", sublen);
|
||||
SetSection (section, true);
|
||||
ClearCurrentSection ();
|
||||
C_ArchiveCVars (this, CVAR_ARCHIVE|CVAR_AUTO|CVAR_MOD|CVAR_CONFIG_ONLY);
|
||||
}
|
||||
|
||||
strncpy (subsection, "UnknownConsoleVariables", sublen);
|
||||
SetSection (section, true);
|
||||
|
|
Loading…
Reference in a new issue