Build config flags are either defined or undefined, never 0

This is for consistency with CMake build configuration

Also added SDL_VIDEO_RENDER_GPU to the non-CMake build configurations
This commit is contained in:
Sam Lantinga
2024-09-05 06:37:20 -07:00
parent e3fd581aca
commit 387774ab8a
59 changed files with 212 additions and 306 deletions

View File

@@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_GPU
#ifdef SDL_VIDEO_RENDER_GPU
#include "SDL_gpu_util.h"
#include "SDL_pipeline_gpu.h"
@@ -222,4 +222,4 @@ SDL_GPUGraphicsPipeline *GPU_GetPipeline(GPU_PipelineCache *cache, GPU_Shaders *
return pipeline;
}
#endif
#endif // SDL_VIDEO_RENDER_GPU

View File

@@ -20,7 +20,8 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_GPU
#ifdef SDL_VIDEO_RENDER_GPU
#include "../../video/SDL_pixels_c.h"
#include "../SDL_d3dmath.h"
#include "../SDL_sysrender.h"
@@ -252,7 +253,7 @@ static bool GPU_UpdateTexture(SDL_Renderer *renderer, SDL_Texture *texture,
if (!SDL_size_mul_check_overflow(rect->w, texturebpp, &row_size) ||
!SDL_size_mul_check_overflow(rect->h, row_size, &data_size)) {
return SDL_SetError("update size overflow");
return SDL_SetError("update size overflow");
}
SDL_GPUTransferBufferCreateInfo tbci;

View File

@@ -20,7 +20,7 @@
*/
#include "SDL_internal.h"
#if SDL_VIDEO_RENDER_GPU
#ifdef SDL_VIDEO_RENDER_GPU
#include "SDL_shaders_gpu.h"