mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-01 00:21:43 +00:00
- defcvars: handle values from a version 219 config
This commit is contained in:
parent
00acbac04e
commit
5c86ad8507
1 changed files with 25 additions and 1 deletions
|
@ -353,6 +353,7 @@ void D_GrabCVarDefaults()
|
|||
sc.ScriptError("Version must be at least 219 (current version %i)", gamelastrunversion);
|
||||
|
||||
FBaseCVar* var;
|
||||
FString CurrentFindCVar;
|
||||
|
||||
while (sc.GetString())
|
||||
{
|
||||
|
@ -360,7 +361,30 @@ void D_GrabCVarDefaults()
|
|||
{
|
||||
sc.MustGetString();
|
||||
}
|
||||
var = FindCVar(sc.String, NULL);
|
||||
|
||||
CurrentFindCVar = sc.String;
|
||||
|
||||
if (lumpversion < 220)
|
||||
{
|
||||
CurrentFindCVar.ToLower();
|
||||
|
||||
// these two got renamed
|
||||
if (strcmp(CurrentFindCVar, "gamma") == 0)
|
||||
{
|
||||
CurrentFindCVar = "vid_gamma";
|
||||
}
|
||||
if (strcmp(CurrentFindCVar, "fullscreen") == 0)
|
||||
{
|
||||
CurrentFindCVar = "vid_fullscreen";
|
||||
}
|
||||
|
||||
// this was removed
|
||||
if (strcmp(CurrentFindCVar, "cd_drive") == 0)
|
||||
break;
|
||||
}
|
||||
|
||||
var = FindCVar(CurrentFindCVar, NULL);
|
||||
|
||||
if (var != NULL)
|
||||
{
|
||||
if (var->GetFlags() & CVAR_ARCHIVE)
|
||||
|
|
Loading…
Reference in a new issue