Skip to content
Permalink
Browse files

Some vid_preferbackend compile fixes

  • Loading branch information
dpjudas committed Dec 2, 2019
1 parent a9e6592 commit 0f6aec5e99c71c46be35122cda88288d28b83afa
Showing with 8 additions and 8 deletions.
  1. +2 −2 src/posix/cocoa/i_video.mm
  2. +2 −2 src/posix/sdl/sdlglvideo.cpp
  3. +4 −4 src/win32/i_system.cpp
@@ -94,7 +94,7 @@ - (void)enterFullscreenOnZoom
EXTERN_CVAR(Bool, vid_hidpi)
EXTERN_CVAR(Int, vid_defwidth)
EXTERN_CVAR(Int, vid_defheight)
EXTERN_CVAR(Int, vid_enablevulkan)
EXTERN_CVAR(Int, vid_preferbackend)
EXTERN_CVAR(Bool, vk_debug)

CVAR(Bool, mvk_debug, false, 0)
@@ -348,7 +348,7 @@ void SetupOpenGLView(CocoaWindow* window)
public:
CocoaVideo()
{
ms_isVulkanEnabled = vid_enablevulkan == 1 && NSAppKitVersionNumber >= 1404; // NSAppKitVersionNumber10_11
ms_isVulkanEnabled = vid_preferbackend == 1 && NSAppKitVersionNumber >= 1404; // NSAppKitVersionNumber10_11
}

~CocoaVideo()
@@ -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_enablevulkan)
EXTERN_CVAR (Int, vid_preferbackend)
EXTERN_CVAR (Bool, cl_capfps)

// PUBLIC DATA DEFINITIONS -------------------------------------------------
@@ -246,7 +246,7 @@ SDLVideo::SDLVideo ()
}

#ifdef HAVE_VULKAN
Priv::vulkanEnabled = vid_enablevulkan == 1
Priv::vulkanEnabled = vid_preferbackend == 1
&& Priv::Vulkan_GetDrawableSize && Priv::Vulkan_GetInstanceExtensions && Priv::Vulkan_CreateSurface;

if (Priv::vulkanEnabled)
@@ -119,8 +119,7 @@ EXTERN_CVAR (Bool, queryiwad);
EXTERN_CVAR (Bool, disableautoload)
EXTERN_CVAR (Bool, autoloadlights)
EXTERN_CVAR (Bool, autoloadbrightmaps)
//EXTERN_CVAR (Int, vid_enablevulkan) // hack - we're just disabling it for now, this code does nothing
uint32_t vid_enablevulkan = 0;
EXTERN_CVAR (Int, vid_preferbackend)

extern HWND Window, ConWindow, GameTitleWindow;
extern HANDLE StdOut;
@@ -590,7 +589,7 @@ BOOL CALLBACK IWADBoxCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPa
// Check the current video settings.
//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_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
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);
// [SP] Upstreamed from Zandronum
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.
disableautoload = SendDlgItemMessage( hDlg, IDC_WELCOME_NOAUTOLOAD, BM_GETCHECK, 0, 0 ) == BST_CHECKED;

0 comments on commit 0f6aec5

Please sign in to comment.
You can’t perform that action at this time.