- migrate vid_enablevulkan to vid_preferbackend in config file

This commit is contained in:
Rachael Alexanderson 2019-12-06 12:05:52 -05:00
parent eaab122076
commit edd7fe1e16
2 changed files with 12 additions and 1 deletions

View file

@ -64,6 +64,7 @@ EXTERN_CVAR (Color, am_cdwallcolor)
EXTERN_CVAR (Bool, wi_percents) EXTERN_CVAR (Bool, wi_percents)
EXTERN_CVAR (Int, gl_texture_hqresizemode) EXTERN_CVAR (Int, gl_texture_hqresizemode)
EXTERN_CVAR (Int, gl_texture_hqresizemult) EXTERN_CVAR (Int, gl_texture_hqresizemult)
EXTERN_CVAR (Int, vid_preferbackend)
FGameConfigFile::FGameConfigFile () FGameConfigFile::FGameConfigFile ()
{ {
@ -509,6 +510,16 @@ void FGameConfigFile::DoGlobalSetup ()
if (v.Int == 3) var->SetGenericRep(newvalue, CVAR_Int); if (v.Int == 3) var->SetGenericRep(newvalue, CVAR_Int);
} }
} }
if (last < 219)
{
// migrate vid_enablevulkan to vid_preferbackend
auto var = FindCVar("vid_enablevulkan", NULL);
if (var != NULL)
{
UCVarValue v = var->GetGenericRep(CVAR_Int);
vid_preferbackend = v.Int;
}
}
} }
} }
} }

View file

@ -65,7 +65,7 @@ const char *GetVersionString();
// Version stored in the ini's [LastRun] section. // Version stored in the ini's [LastRun] section.
// Bump it if you made some configuration change that you want to // Bump it if you made some configuration change that you want to
// be able to migrate in FGameConfigFile::DoGlobalSetup(). // be able to migrate in FGameConfigFile::DoGlobalSetup().
#define LASTRUNVERSION "218" #define LASTRUNVERSION "219"
// Protocol version used in demos. // Protocol version used in demos.
// Bump it if you change existing DEM_ commands or add new ones. // Bump it if you change existing DEM_ commands or add new ones.