Add windows_with_undefs.h to fix conflicts with windows.h

windows.h adds macros such as `#define GetMessage GetMessageA` which
cause conflicts in naming when for example a class definition is before
windows.h and a use is after windows.h

Add a header that can be used both to include windows.h and remove
defines, and to only remove defines (when windows.h is included by)
external dependencies.
This commit is contained in:
Corentin Wallez
2018-07-17 11:27:58 +02:00
committed by Corentin Wallez
parent 6aaa10fa60
commit 629c11baad
6 changed files with 51 additions and 1 deletions

View File

@@ -87,4 +87,10 @@ class VkNonDispatchableHandle {
# undef VK_NULL_HANDLE
# define VK_NULL_HANDLE nullptr
// Remove windows.h macros after vulkan_platform's include of windows.h
#include "common/Platform.h"
#if defined(NXT_PLATFORM_WINDOWS)
# include "common/windows_with_undefs.h"
#endif
#endif // COMMON_VULKANPLATFORM_H_