diff --git a/src/gameconfigfile.cpp b/src/gameconfigfile.cpp index 2b020cbfac..fe07d73e80 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 ebeeb3217a..19f5263a14 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.