Fix MINGW64 windows build

This commit is contained in:
Denis Pauk 2020-04-02 23:01:33 +03:00 committed by Yamagi
parent a701226a19
commit 896346cf1a
3 changed files with 15 additions and 4 deletions

View file

@ -405,6 +405,10 @@ ifeq ($(WITH_CURL),yes)
release/yquake2.exe : CFLAGS += -DUSE_CURL
endif
ifeq ($(WITH_REFVK),yes)
release/yquake2.exe : CFLAGS += -DUSE_REFVK
endif
ifeq ($(WITH_OPENAL),yes)
release/yquake2.exe : CFLAGS += -DUSE_OPENAL -DDEFAULT_OPENAL_DRIVER='"openal32.dll"'
endif

View file

@ -1594,7 +1594,7 @@ qboolean QVk_Init(SDL_Window *window)
if (!SDL_Vulkan_GetInstanceExtensions(window, &extCount, NULL))
{
ri.Sys_Error(ERR_FATAL, "%s() SDL_Vulkan_GetInstanceExtensions failed: %s",
R_Printf(PRINT_ALL, "%s() SDL_Vulkan_GetInstanceExtensions failed: %s",
__func__, SDL_GetError());
return false;
}
@ -1606,7 +1606,7 @@ qboolean QVk_Init(SDL_Window *window)
wantedExtensions = malloc(extCount * sizeof(const char *));
if (!SDL_Vulkan_GetInstanceExtensions(window, &extCount, wantedExtensions))
{
ri.Sys_Error(ERR_FATAL, "%s() SDL_Vulkan_GetInstanceExtensions failed: %s",
R_Printf(PRINT_ALL, "%s() SDL_Vulkan_GetInstanceExtensions failed: %s",
__func__, SDL_GetError());
return false;
}

View file

@ -1500,7 +1500,7 @@ R_InitContext(void *win)
if(win == NULL)
{
ri.Sys_Error(ERR_FATAL, "%s() must not be called with NULL argument!", __func__);
R_Printf(PRINT_ALL, "%s() must not be called with NULL argument!", __func__);
return false;
}
@ -1524,7 +1524,7 @@ qboolean Vkimp_CreateSurface()
{
if (!SDL_Vulkan_CreateSurface(window, vk_instance, &vk_surface))
{
ri.Sys_Error(ERR_FATAL, "%s() SDL_Vulkan_CreateSurface failed: %s",
R_Printf(PRINT_ALL, "%s() SDL_Vulkan_CreateSurface failed: %s",
__func__, SDL_GetError());
return false;
}
@ -1546,6 +1546,13 @@ R_IsVsyncActive(void)
static int R_PrepareForWindow(void)
{
#if defined(_WIN32)
if (SDL_Vulkan_LoadLibrary("libvulkan-1.dll"))
{
R_Printf(PRINT_ALL, "%s() Loader import failed: %s",
__func__, SDL_GetError());
}
#endif
return SDL_WINDOW_VULKAN;
}