- rename vid_backend to vid_enablevulkan. Also changed the CVAR from a 0-state enable to 1-state. So vid_enablevulkan==1 enables vulkan now. This should be less confusing.

This commit is contained in:
Rachael Alexanderson 2019-04-16 08:10:57 -04:00
parent 9d29a460de
commit 09a2b53b21
5 changed files with 8 additions and 8 deletions

View file

@ -95,7 +95,7 @@ EXTERN_CVAR(Bool, vid_vsync)
EXTERN_CVAR(Bool, vid_hidpi)
EXTERN_CVAR(Int, vid_defwidth)
EXTERN_CVAR(Int, vid_defheight)
EXTERN_CVAR(Int, vid_backend)
EXTERN_CVAR(Int, vid_enablevulkan)
EXTERN_CVAR(Bool, vk_debug)
CUSTOM_CVAR(Bool, vid_autoswitch, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
@ -342,7 +342,7 @@ class CocoaVideo : public IVideo
public:
CocoaVideo()
{
ms_isVulkanEnabled = vid_backend == 0 && NSAppKitVersionNumber >= 1404; // NSAppKitVersionNumber10_11
ms_isVulkanEnabled = vid_enablevulkan == 1 && NSAppKitVersionNumber >= 1404; // NSAppKitVersionNumber10_11
}
~CocoaVideo()

View file

@ -73,7 +73,7 @@ EXTERN_CVAR (Int, vid_adapter)
EXTERN_CVAR (Int, vid_displaybits)
EXTERN_CVAR (Int, vid_defwidth)
EXTERN_CVAR (Int, vid_defheight)
EXTERN_CVAR (Int, vid_backend)
EXTERN_CVAR (Int, vid_enablevulkan)
EXTERN_CVAR (Bool, cl_capfps)
// PUBLIC DATA DEFINITIONS -------------------------------------------------
@ -238,7 +238,7 @@ SDLVideo::SDLVideo ()
}
#ifdef HAVE_VULKAN
Priv::vulkanEnabled = vid_backend == 0
Priv::vulkanEnabled = vid_enablevulkan == 1
&& Priv::Vulkan_GetDrawableSize && Priv::Vulkan_GetInstanceExtensions && Priv::Vulkan_CreateSurface;
if (Priv::vulkanEnabled)

View file

@ -108,7 +108,7 @@ CUSTOM_CVAR(Int, vid_rendermode, 4, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOIN
// No further checks needed. All this changes now is which scene drawer the render backend calls.
}
CUSTOM_CVAR(Int, vid_backend, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
CUSTOM_CVAR(Int, vid_enablevulkan, 1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
{
// [SP] This may seem pointless - but I don't want to implement live switching just
// yet - I'm pretty sure it's going to require a lot of reinits and destructions to

View file

@ -51,7 +51,7 @@
#include "i_system.h"
#include "swrenderer/r_swrenderer.h"
EXTERN_CVAR(Int, vid_backend)
EXTERN_CVAR(Int, vid_enablevulkan)
extern HWND Window;
@ -130,7 +130,7 @@ void I_InitGraphics ()
}
#ifdef HAVE_VULKAN
if (vid_backend == 0)
if (vid_enablevulkan == 1)
{
// first try Vulkan, if that fails OpenGL
try

View file

@ -2743,7 +2743,7 @@ OptionMenu "vkoptions"
StaticText "$VK_WARNING"
StaticText "$VK_RESTART"
StaticText ""
Option "$VKMNU_ENABLE", "vid_backend", "OffOn"
Option "$VKMNU_ENABLE", "vid_enablevulkan", "OnOff"
TextField "$VKMNU_DEVICE", vk_device
Option "$VKMNU_HDR", "vk_hdr", "OnOff"
}