summaryrefslogtreecommitdiff
path: root/thirdparty/vulkan/loader
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-10-29 12:45:10 +0100
committerRémi Verschelde <rverschelde@gmail.com>2020-10-29 12:47:35 +0100
commit6a951267ae31a1e77469b32129ee4815c98de800 (patch)
treeddb4d5bff48f728aec340306499010a560a34a35 /thirdparty/vulkan/loader
parenta4f70d7e6cb2b83f152717a69c9c042dd9424fc9 (diff)
vulkan: Backport build fix for MinGW-w64 8.0.0
Taken from https://github.com/KhronosGroup/Vulkan-Loader/pull/475. Supersedes and reverts #43119 since the upstream change removes the need for that custom define.
Diffstat (limited to 'thirdparty/vulkan/loader')
-rw-r--r--thirdparty/vulkan/loader/loader.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/thirdparty/vulkan/loader/loader.c b/thirdparty/vulkan/loader/loader.c
index a6b5522cd4..86ac79d963 100644
--- a/thirdparty/vulkan/loader/loader.c
+++ b/thirdparty/vulkan/loader/loader.c
@@ -71,6 +71,9 @@
#include <devpkey.h>
#include <winternl.h>
#include <strsafe.h>
+#ifdef __MINGW32__
+#undef strcpy // fix error with redfined strcpy when building with MinGW-w64
+#endif
#include <dxgi1_6.h>
#include "adapters.h"
@@ -695,7 +698,11 @@ VkResult loaderGetDeviceRegistryFiles(const struct loader_instance *inst, char *
LPCSTR value_name) {
static const wchar_t *softwareComponentGUID = L"{5c4c3332-344d-483c-8739-259e934c9cc8}";
static const wchar_t *displayGUID = L"{4d36e968-e325-11ce-bfc1-08002be10318}";
+#ifdef CM_GETIDLIST_FILTER_PRESENT
const ULONG flags = CM_GETIDLIST_FILTER_CLASS | CM_GETIDLIST_FILTER_PRESENT;
+#else
+ const ULONG flags = 0x300;
+#endif
wchar_t childGuid[MAX_GUID_STRING_LEN + 2]; // +2 for brackets {}
ULONG childGuidSize = sizeof(childGuid);