소스 검색

SDL3 GPU: Fix -Wbool-conversion warnings

WillyJL 3 달 전
부모
커밋
4eff36ef53
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      src/gpu/SDL_gpu.c
  2. 1 1
      src/gpu/vulkan/SDL_gpu_vulkan.c

+ 1 - 1
src/gpu/SDL_gpu.c

@@ -2536,7 +2536,7 @@ void SDL_EndGPUComputePass(
     if (COMPUTEPASS_DEVICE->debug_mode) {
         commandBufferCommonHeader = (CommandBufferCommonHeader *)COMPUTEPASS_COMMAND_BUFFER;
         commandBufferCommonHeader->compute_pass.in_progress = false;
-        commandBufferCommonHeader->compute_pass.compute_pipeline = false;
+        commandBufferCommonHeader->compute_pass.compute_pipeline = NULL;
         SDL_zeroa(commandBufferCommonHeader->compute_pass.sampler_bound);
         SDL_zeroa(commandBufferCommonHeader->compute_pass.read_only_storage_texture_bound);
         SDL_zeroa(commandBufferCommonHeader->compute_pass.read_only_storage_buffer_bound);

+ 1 - 1
src/gpu/vulkan/SDL_gpu_vulkan.c

@@ -11700,7 +11700,7 @@ static SDL_GPUDevice *VULKAN_CreateDevice(bool debugMode, bool preferLowPower, S
     renderer = (VulkanRenderer *)SDL_calloc(1, sizeof(*renderer));
     if (!renderer) {
         SDL_Vulkan_UnloadLibrary();
-        return false;
+        return NULL;
     }
 
     renderer->debugMode = debugMode;