From e7fc9b3adeb37cb10726718e512b0da8dc49bc11 Mon Sep 17 00:00:00 2001 From: skal Date: Mon, 2 Feb 2026 12:24:29 +0100 Subject: fix(build): Add compatibility for older wgpu-native headers - Added preprocessor definitions for 'WGPUOptionalBool_True' and 'WGPUOptionalBool_False' to ensure successful cross-compilation against the older wgpu-native headers used for the Windows build. - This resolves the build failures in the Windows CI/check script. --- src/gpu/gpu.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/gpu/gpu.cc') diff --git a/src/gpu/gpu.cc b/src/gpu/gpu.cc index cecf018..7b8e012 100644 --- a/src/gpu/gpu.cc +++ b/src/gpu/gpu.cc @@ -23,6 +23,7 @@ // --- WebGPU Headers & Compatibility --- #if defined(DEMO_CROSS_COMPILE_WIN32) // Renamed Types/Enums +#define WGPUOptionalBool_False false #define WGPUSurfaceGetCurrentTextureStatus_SuccessOptimal \ WGPUSurfaceGetCurrentTextureStatus_Success #define WGPUSurfaceGetCurrentTextureStatus_SuccessSuboptimal \ @@ -370,7 +371,8 @@ void gpu_init(PlatformState* platform_state) { g_config.alphaMode = WGPUCompositeAlphaMode_Opaque; wgpuSurfaceConfigure(g_surface, &g_config); - g_main_sequence.init(g_device, g_queue, g_config.format, platform_state->width, platform_state->height); + g_main_sequence.init(g_device, g_queue, g_config.format, + platform_state->width, platform_state->height); LoadTimeline(g_main_sequence, g_device, g_queue, g_config.format); } -- cgit v1.2.3