Some vid_preferbackend compile fixes

This commit is contained in:
Magnus Norddahl 2019-12-02 20:12:27 +01:00
parent a9e6592feb
commit 0f6aec5e99
3 changed files with 8 additions and 8 deletions

View file

@ -94,7 +94,7 @@
EXTERN_CVAR(Bool, vid_hidpi) EXTERN_CVAR(Bool, vid_hidpi)
EXTERN_CVAR(Int, vid_defwidth) EXTERN_CVAR(Int, vid_defwidth)
EXTERN_CVAR(Int, vid_defheight) EXTERN_CVAR(Int, vid_defheight)
EXTERN_CVAR(Int, vid_enablevulkan) EXTERN_CVAR(Int, vid_preferbackend)
EXTERN_CVAR(Bool, vk_debug) EXTERN_CVAR(Bool, vk_debug)
CVAR(Bool, mvk_debug, false, 0) CVAR(Bool, mvk_debug, false, 0)
@ -348,7 +348,7 @@ class CocoaVideo : public IVideo
public: public:
CocoaVideo() CocoaVideo()
{ {
ms_isVulkanEnabled = vid_enablevulkan == 1 && NSAppKitVersionNumber >= 1404; // NSAppKitVersionNumber10_11 ms_isVulkanEnabled = vid_preferbackend == 1 && NSAppKitVersionNumber >= 1404; // NSAppKitVersionNumber10_11
} }
~CocoaVideo() ~CocoaVideo()

View file

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

View file

@ -119,8 +119,7 @@ EXTERN_CVAR (Bool, queryiwad);
EXTERN_CVAR (Bool, disableautoload) EXTERN_CVAR (Bool, disableautoload)
EXTERN_CVAR (Bool, autoloadlights) EXTERN_CVAR (Bool, autoloadlights)
EXTERN_CVAR (Bool, autoloadbrightmaps) EXTERN_CVAR (Bool, autoloadbrightmaps)
//EXTERN_CVAR (Int, vid_enablevulkan) // hack - we're just disabling it for now, this code does nothing EXTERN_CVAR (Int, vid_preferbackend)
uint32_t vid_enablevulkan = 0;
extern HWND Window, ConWindow, GameTitleWindow; extern HWND Window, ConWindow, GameTitleWindow;
extern HANDLE StdOut; extern HANDLE StdOut;
@ -590,7 +589,7 @@ BOOL CALLBACK IWADBoxCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPa
// Check the current video settings. // Check the current video settings.
//SendDlgItemMessage( hDlg, vid_renderer ? IDC_WELCOME_OPENGL : IDC_WELCOME_SOFTWARE, BM_SETCHECK, BST_CHECKED, 0 ); //SendDlgItemMessage( hDlg, vid_renderer ? IDC_WELCOME_OPENGL : IDC_WELCOME_SOFTWARE, BM_SETCHECK, BST_CHECKED, 0 );
SendDlgItemMessage( hDlg, IDC_WELCOME_FULLSCREEN, BM_SETCHECK, fullscreen ? BST_CHECKED : BST_UNCHECKED, 0 ); SendDlgItemMessage( hDlg, IDC_WELCOME_FULLSCREEN, BM_SETCHECK, fullscreen ? BST_CHECKED : BST_UNCHECKED, 0 );
SendDlgItemMessage( hDlg, IDC_WELCOME_VULKAN, BM_SETCHECK, vid_enablevulkan ? BST_CHECKED : BST_UNCHECKED, 0 ); SendDlgItemMessage( hDlg, IDC_WELCOME_VULKAN, BM_SETCHECK, (vid_preferbackend == 1) ? BST_CHECKED : BST_UNCHECKED, 0 );
// [SP] This is our's // [SP] This is our's
SendDlgItemMessage( hDlg, IDC_WELCOME_NOAUTOLOAD, BM_SETCHECK, disableautoload ? BST_CHECKED : BST_UNCHECKED, 0 ); SendDlgItemMessage( hDlg, IDC_WELCOME_NOAUTOLOAD, BM_SETCHECK, disableautoload ? BST_CHECKED : BST_UNCHECKED, 0 );
@ -636,7 +635,8 @@ BOOL CALLBACK IWADBoxCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPa
SetQueryIWad(hDlg); SetQueryIWad(hDlg);
// [SP] Upstreamed from Zandronum // [SP] Upstreamed from Zandronum
fullscreen = SendDlgItemMessage( hDlg, IDC_WELCOME_FULLSCREEN, BM_GETCHECK, 0, 0 ) == BST_CHECKED; fullscreen = SendDlgItemMessage( hDlg, IDC_WELCOME_FULLSCREEN, BM_GETCHECK, 0, 0 ) == BST_CHECKED;
vid_enablevulkan = SendDlgItemMessage( hDlg, IDC_WELCOME_VULKAN, BM_GETCHECK, 0, 0 ) == BST_CHECKED; if (SendDlgItemMessage(hDlg, IDC_WELCOME_VULKAN, BM_GETCHECK, 0, 0) == BST_CHECKED) vid_preferbackend = 1;
else if (SendDlgItemMessage(hDlg, IDC_WELCOME_VULKAN, BM_GETCHECK, 0, 0) != BST_CHECKED && vid_preferbackend == 1) vid_preferbackend = 0;
// [SP] This is our's. // [SP] This is our's.
disableautoload = SendDlgItemMessage( hDlg, IDC_WELCOME_NOAUTOLOAD, BM_GETCHECK, 0, 0 ) == BST_CHECKED; disableautoload = SendDlgItemMessage( hDlg, IDC_WELCOME_NOAUTOLOAD, BM_GETCHECK, 0, 0 ) == BST_CHECKED;