From 20e61ead496ad0df3068db0b485df4899e23996d Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Tue, 5 Nov 2019 08:57:50 -0500 Subject: [PATCH] - add Vulkan to the startup box in Windows --- src/win32/i_system.cpp | 3 +++ src/win32/resource.h | 1 + src/win32/zdoom.rc | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/win32/i_system.cpp b/src/win32/i_system.cpp index 6f8a4fd57..13859176d 100644 --- a/src/win32/i_system.cpp +++ b/src/win32/i_system.cpp @@ -119,6 +119,7 @@ EXTERN_CVAR (Bool, queryiwad); EXTERN_CVAR (Bool, disableautoload) EXTERN_CVAR (Bool, autoloadlights) EXTERN_CVAR (Bool, autoloadbrightmaps) +EXTERN_CVAR (Int, vid_enablevulkan) extern HWND Window, ConWindow, GameTitleWindow; extern HANDLE StdOut; @@ -588,6 +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 ); // [SP] This is our's SendDlgItemMessage( hDlg, IDC_WELCOME_NOAUTOLOAD, BM_SETCHECK, disableautoload ? BST_CHECKED : BST_UNCHECKED, 0 ); @@ -633,6 +635,7 @@ 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; // [SP] This is our's. disableautoload = SendDlgItemMessage( hDlg, IDC_WELCOME_NOAUTOLOAD, BM_GETCHECK, 0, 0 ) == BST_CHECKED; diff --git a/src/win32/resource.h b/src/win32/resource.h index dcb94999f..3a11a0c81 100644 --- a/src/win32/resource.h +++ b/src/win32/resource.h @@ -165,3 +165,4 @@ #define IDC_WELCOME_NOAUTOLOAD 4023 #define IDC_WELCOME_LIGHTS 4024 #define IDC_WELCOME_BRIGHTMAPS 4025 +#define IDC_WELCOME_VULKAN 4026 diff --git a/src/win32/zdoom.rc b/src/win32/zdoom.rc index d19f6c40e..0e9caf877 100644 --- a/src/win32/zdoom.rc +++ b/src/win32/zdoom.rc @@ -220,6 +220,7 @@ FONT 8, "MS Shell Dlg" CONTROL "", IDC_IWADLIST, LISTBOX, LBS_NOTIFY | LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_TABSTOP, 12, 56, 200, 87 CONTROL "Video settings", IDC_STATIC, BUTTON, BS_GROUPBOX | WS_CHILD | WS_VISIBLE, 8, 155, 109, 52 CONTROL "Fullscreen", IDC_WELCOME_FULLSCREEN, BUTTON, BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 12, 170, 48, 10 + CONTROL "Vulkan", IDC_WELCOME_VULKAN, BUTTON, BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 12, 180, 48, 10 CONTROL "Resource settings", IDC_STATIC, BUTTON, BS_GROUPBOX | WS_CHILD | WS_VISIBLE, 123, 155, 95, 52 CONTROL "Disable autoload", IDC_WELCOME_NOAUTOLOAD, BUTTON, BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 130, 170, 65, 10 CONTROL "Load lights", IDC_WELCOME_LIGHTS, BUTTON, BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 130, 180, 51, 10 @@ -240,6 +241,7 @@ BEGIN LISTBOX IDC_IWADLIST,12,56,200,72,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP GROUPBOX "Video settings",IDC_STATIC,8,138,208,28 CONTROL "Fullscreen",IDC_WELCOME_FULLSCREEN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,124,150,48,10 + CONTROL "Vulkan", IDC_WELCOME_VULKAN, BUTTON, BS_AUTOCHECKBOX | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 124, 180, 48, 10 CONTROL "Disable autoload",IDC_WELCOME_NOAUTOLOAD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,148,39,65,10 CONTROL "Lights.pk3",IDC_WELCOME_LIGHTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,46,182,51,10 CONTROL "Brightmaps.pk3",IDC_WELCOME_BRIGHTMAPS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,111,182,65,10