diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-02 12:24:29 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-02 12:24:29 +0100 |
| commit | e7fc9b3adeb37cb10726718e512b0da8dc49bc11 (patch) | |
| tree | d46b2877cc17692515c9dfe90c67417c6639e4ae /src/gpu/gpu.cc | |
| parent | 053b29d162e7b157cecbfcd214005a961103ad67 (diff) | |
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.
Diffstat (limited to 'src/gpu/gpu.cc')
| -rw-r--r-- | src/gpu/gpu.cc | 4 |
1 files changed, 3 insertions, 1 deletions
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); } |
