- Fixed compilation with MinGW.

This commit is contained in:
drfrag 2019-07-15 12:29:15 +02:00 committed by Christoph Oelckers
parent f25e5c738c
commit 416f5d03b7
3 changed files with 4 additions and 1 deletions

View file

@ -388,6 +388,7 @@ if( ZD_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE )
if( WIN32 )
set( CMAKE_CXX_FLAGS "-Wno-unknown-pragmas -Wno-comment -Wno-format ${CMAKE_CXX_FLAGS}" )
set( CMAKE_CXX_FLAGS "-D_UNICODE -DUNICODE ${CMAKE_CXX_FLAGS}" )
set( CMAKE_CXX_FLAGS "-D_WIN32_WINNT=0x0600 ${CMAKE_CXX_FLAGS}" )
set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -municode" )
endif()

View file

@ -1,4 +1,5 @@
#include <memory>
#include "jit.h"
#include "jitintern.h"

View file

@ -1,5 +1,6 @@
#include <assert.h>
#include <algorithm>
#ifdef _WIN32
#define VK_USE_PLATFORM_WIN32_KHR
@ -49,7 +50,7 @@ bool I_GetVulkanPlatformExtensions(unsigned int *count, const char **names)
else
{
const bool result = *count >= extensionCount;
*count = min(*count, extensionCount);
*count = std::min<unsigned int>(*count, extensionCount);
for (unsigned int i = 0; i < *count; ++i)
{