From 91f1dc0cd270afddbe188f7444d75dee3cc562dc Mon Sep 17 00:00:00 2001 From: Rajesh Malviya Date: Sun, 25 Aug 2024 19:31:57 +0530 Subject: [PATCH] Fix desiredMaximumFrameLatency type in wgpu.h (#403) Fixes #401 --- ffi/wgpu.h | 2 +- src/conv.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ffi/wgpu.h b/ffi/wgpu.h index 2b5893db..48738396 100644 --- a/ffi/wgpu.h +++ b/ffi/wgpu.h @@ -247,7 +247,7 @@ typedef struct WGPUQuerySetDescriptorExtras { typedef struct WGPUSurfaceConfigurationExtras { WGPUChainedStruct chain; - WGPUBool desiredMaximumFrameLatency; + uint32_t desiredMaximumFrameLatency; } WGPUSurfaceConfigurationExtras WGPU_STRUCTURE_ATTRIBUTE; typedef void (*WGPULogCallback)(WGPULogLevel level, char const * message, void * userdata); diff --git a/src/conv.rs b/src/conv.rs index 04a33527..aeb38fbd 100644 --- a/src/conv.rs +++ b/src/conv.rs @@ -1665,7 +1665,7 @@ pub fn map_surface_configuration( .collect(), desired_maximum_frame_latency: match extras { Some(extras) => extras.desiredMaximumFrameLatency, - // Default is 2, https://github.com/gfx-rs/wgpu/blob/484457d95993b00b91905fae0e539a093423cc28/wgpu/src/lib.rs#L4796 + // Default is 2, https://github.com/gfx-rs/wgpu/blob/7b4cbc26192d6d56a31f8e67769e656a6627b222/wgpu/src/api/surface.rs#L87 None => 2, }, }