From edd7fe1e1645c5b76c109371febbef4833517345 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Fri, 6 Dec 2019 12:05:52 -0500 Subject: [PATCH] - migrate vid_enablevulkan to vid_preferbackend in config file --- src/gameconfigfile.cpp | 11 +++++++++++ src/version.h | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/gameconfigfile.cpp b/src/gameconfigfile.cpp index 2b020cbfa..fe07d73e8 100644 --- a/src/gameconfigfile.cpp +++ b/src/gameconfigfile.cpp @@ -64,6 +64,7 @@ EXTERN_CVAR (Color, am_cdwallcolor) EXTERN_CVAR (Bool, wi_percents) EXTERN_CVAR (Int, gl_texture_hqresizemode) EXTERN_CVAR (Int, gl_texture_hqresizemult) +EXTERN_CVAR (Int, vid_preferbackend) FGameConfigFile::FGameConfigFile () { @@ -509,6 +510,16 @@ void FGameConfigFile::DoGlobalSetup () 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; + } + } } } } diff --git a/src/version.h b/src/version.h index ebeeb3217..19f5263a1 100644 --- a/src/version.h +++ b/src/version.h @@ -65,7 +65,7 @@ const char *GetVersionString(); // Version stored in the ini's [LastRun] section. // Bump it if you made some configuration change that you want to // be able to migrate in FGameConfigFile::DoGlobalSetup(). -#define LASTRUNVERSION "218" +#define LASTRUNVERSION "219" // Protocol version used in demos. // Bump it if you change existing DEM_ commands or add new ones.