From a07f92a81cb90dab9c0b89f1bd52f5845f559d22 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Sun, 25 Aug 2024 22:52:01 +0300 Subject: [PATCH] [Windows] Move __REQUIRED_RPCNDR_H_VERSION__ to the header. --- drivers/d3d12/SCsub | 1 - drivers/d3d12/rendering_device_driver_d3d12.h | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/d3d12/SCsub b/drivers/d3d12/SCsub index 35227ebe08b..482a5491890 100644 --- a/drivers/d3d12/SCsub +++ b/drivers/d3d12/SCsub @@ -136,7 +136,6 @@ if env.msvc: ] else: extra_defines += [ - ("__REQUIRED_RPCNDR_H_VERSION__", 475), "HAVE_STRUCT_TIMESPEC", ] diff --git a/drivers/d3d12/rendering_device_driver_d3d12.h b/drivers/d3d12/rendering_device_driver_d3d12.h index ac0ad41294e..d8381279ec8 100644 --- a/drivers/d3d12/rendering_device_driver_d3d12.h +++ b/drivers/d3d12/rendering_device_driver_d3d12.h @@ -36,6 +36,11 @@ #include "core/templates/self_list.h" #include "servers/rendering/rendering_device_driver.h" +#ifndef _MSC_VER +// Match current version used by MinGW, MSVC and Direct3D 12 headers use 500. +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + #if defined(__GNUC__) && !defined(__clang__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wnon-virtual-dtor"