Fix potential cases where we define SDL_GPU_* as an undefined symbol

This commit is contained in:
Sam Lantinga 2024-08-29 17:17:24 -07:00
parent b356c65005
commit d86f504637
2 changed files with 13 additions and 4 deletions

View File

@ -310,11 +310,15 @@ typedef unsigned int uintptr_t;
/* Enable Vulkan support */
#define SDL_VIDEO_VULKAN 1
#define SDL_GPU_D3D11 HAVE_D3D11_H
#if !defined(SDL_GPU_D3D11) && defined(HAVE_D3D11_H)
#define SDL_GPU_D3D11 1
#endif
#if !defined(SDL_GPU_D3D12)
#define SDL_GPU_D3D12 1
#endif
#define SDL_GPU_VULKAN SDL_VIDEO_VULKAN
#if !defined(SDL_GPU_VULKAN) && defined(SDL_VIDEO_VULKAN)
#define SDL_GPU_VULKAN 1
#endif
#ifndef SDL_VIDEO_RENDER_VULKAN
#define SDL_VIDEO_RENDER_VULKAN 1

View File

@ -232,11 +232,16 @@
/* Enable Vulkan support */
#define SDL_VIDEO_VULKAN 1
#define SDL_GPU_D3D11 HAVE_D3D11_H
#if !defined(SDL_GPU_D3D11) && defined(HAVE_D3D11_H)
#define SDL_GPU_D3D11 1
#endif
#if !defined(SDL_GPU_D3D12)
#define SDL_GPU_D3D12 1
#endif
#define SDL_GPU_VULKAN SDL_VIDEO_VULKAN
#if !defined(SDL_GPU_VULKAN) && defined(SDL_VIDEO_VULKAN)
#define SDL_GPU_VULKAN 1
#endif
/* Enable system power support */
#define SDL_POWER_WINDOWS 1