35 #include "../ref_vk/vk_local.h"
47 #define WINDOW_CLASS_NAME "Quake 2"
65 wc.hCursor = LoadCursor (
NULL,IDC_ARROW);
66 wc.hbrBackground = (
void *)COLOR_GRAYTEXT;
70 if (!RegisterClass (&wc) )
75 exstyle = WS_EX_TOPMOST;
76 stylebits = WS_POPUP|WS_VISIBLE;
89 AdjustWindowRect (&
r, stylebits,
FALSE);
120 memset(&dm, 0,
sizeof(dm));
122 dm.dmSize =
sizeof(dm);
123 dm.dmPelsWidth =
width;
125 dm.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT;
130 dm.dmFields |= DM_BITSPERPEL;
133 if ( ChangeDisplaySettingsEx(
vkw_state.
monInfo.szDevice, &dm,
NULL, CDS_FULLSCREEN,
NULL ) != DISP_CHANGE_SUCCESSFUL )
140 SWP_NOACTIVATE | SWP_NOCOPYBITS | SWP_NOOWNERZORDER | SWP_NOREPOSITION | SWP_NOZORDER );
162 extensions[0] = VK_KHR_SURFACE_EXTENSION_NAME;
163 extensions[1] = VK_KHR_WIN32_SURFACE_EXTENSION_NAME;
172 VkWin32SurfaceCreateInfoKHR surfaceCreateInfo = {
173 .sType = VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR,
176 .hinstance = GetModuleHandle(
NULL),
189 const char *win_fs[] = {
"W",
"FS" };
221 int bitspixel = GetDeviceCaps( hdc, BITSPIXEL );
306 #define OSR2_BUILD_NUMBER 1111
310 vinfo.dwOSVersionInfoSize =
sizeof(vinfo);
314 if ( GetVersionEx( &vinfo) )
316 if ( vinfo.dwMajorVersion > 4 )
320 else if ( vinfo.dwMajorVersion == 4 )
322 if ( vinfo.dwPlatformId == VER_PLATFORM_WIN32_NT )
326 else if ( vinfo.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS )