Skip to content

Commit

Permalink
Compilation without vulkan: SDL_GPU_VULKAN is always defined for some…
Browse files Browse the repository at this point in the history
… plateform (at android, macos), test against 0 or 1
  • Loading branch information
1bsyl committed Sep 5, 2024
1 parent 249a74e commit d74e258
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/gpu/SDL_gpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ static const SDL_GPUBootstrap *backends[] = {
#ifdef SDL_GPU_D3D12
&D3D12Driver,
#endif
#ifdef SDL_GPU_VULKAN
#if defined(SDL_GPU_VULKAN) && SDL_GPU_VULKAN
&VulkanDriver,
#endif
#ifdef SDL_GPU_D3D11
Expand Down
2 changes: 1 addition & 1 deletion src/render/sdlgpu/SDL_shaders_gpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ typedef struct GPU_ShaderModuleSource
SDL_GPUShaderFormat format;
} GPU_ShaderModuleSource;

#ifdef SDL_GPU_VULKAN
#if defined(SDL_GPU_VULKAN) && SDL_GPU_VULKAN
#define IF_VULKAN(...) __VA_ARGS__
#define HAVE_SPIRV_SHADERS 1
#include "shaders/spir-v.h"
Expand Down

0 comments on commit d74e258

Please sign in to comment.