Skip to content

Commit 6689924

Browse files
Further fixes for compilation on Windows. Defined NOMINMAX for Windows.h. Issue #38
1 parent 447e36f commit 6689924

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

src/vk_mem_alloc.h

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,6 +1357,20 @@ Features deliberately excluded from the scope of this library:
13571357
13581358
*/
13591359

1360+
/*
1361+
Define this macro to 0/1 to disable/enable support for recording functionality,
1362+
available through VmaAllocatorCreateInfo::pRecordSettings.
1363+
*/
1364+
#ifndef VMA_RECORDING_ENABLED
1365+
#ifdef _WIN32
1366+
#define VMA_RECORDING_ENABLED 1
1367+
#else
1368+
#define VMA_RECORDING_ENABLED 0
1369+
#endif
1370+
#endif
1371+
1372+
#define NOMINMAX // For Windows.h
1373+
13601374
#include <vulkan/vulkan.h>
13611375

13621376
#if VMA_RECORDING_ENABLED
@@ -1483,18 +1497,6 @@ typedef enum VmaRecordFlagBits {
14831497
} VmaRecordFlagBits;
14841498
typedef VkFlags VmaRecordFlags;
14851499

1486-
/*
1487-
Define this macro to 0/1 to disable/enable support for recording functionality,
1488-
available through VmaAllocatorCreateInfo::pRecordSettings.
1489-
*/
1490-
#ifndef VMA_RECORDING_ENABLED
1491-
#ifdef _WIN32
1492-
#define VMA_RECORDING_ENABLED 1
1493-
#else
1494-
#define VMA_RECORDING_ENABLED 0
1495-
#endif
1496-
#endif
1497-
14981500
/// Parameters for recording calls to VMA functions. To be used in VmaAllocatorCreateInfo::pRecordSettings.
14991501
typedef struct VmaRecordSettings
15001502
{

0 commit comments

Comments
 (0)