@@ -723,7 +723,7 @@ pub unsafe extern "C" fn wgpuAdapterGetLimits(
723
723
pub unsafe extern "C" fn wgpuAdapterGetInfo (
724
724
adapter : native:: WGPUAdapter ,
725
725
info : Option < & mut native:: WGPUAdapterInfo > ,
726
- ) {
726
+ ) -> native :: WGPUStatus {
727
727
let adapter = adapter. as_ref ( ) . expect ( "invalid adapter" ) ;
728
728
let info = info. expect ( "invalid return pointer \" info\" " ) ;
729
729
let context = adapter. context . as_ref ( ) ;
@@ -739,6 +739,8 @@ pub unsafe extern "C" fn wgpuAdapterGetInfo(
739
739
info. adapterType = map_adapter_type ( result. device_type ) ;
740
740
info. vendorID = result. vendor ;
741
741
info. deviceID = result. device ;
742
+
743
+ native:: WGPUStatus_Success
742
744
}
743
745
744
746
#[ no_mangle]
@@ -3880,7 +3882,7 @@ pub unsafe extern "C" fn wgpuSurfaceGetCapabilities(
3880
3882
surface : native:: WGPUSurface ,
3881
3883
adapter : native:: WGPUAdapter ,
3882
3884
capabilities : Option < & mut native:: WGPUSurfaceCapabilities > ,
3883
- ) {
3885
+ ) -> native :: WGPUStatus {
3884
3886
let ( adapter_id, context) = {
3885
3887
let adapter = adapter. as_ref ( ) . expect ( "invalid adapter" ) ;
3886
3888
( adapter. id , & adapter. context )
@@ -3893,7 +3895,10 @@ pub unsafe extern "C" fn wgpuSurfaceGetCapabilities(
3893
3895
Err (
3894
3896
wgc:: instance:: GetSurfaceSupportError :: FailedToRetrieveSurfaceCapabilitiesForAdapter ,
3895
3897
) => wgt:: SurfaceCapabilities :: default ( ) ,
3896
- Err ( cause) => handle_error_fatal ( cause, "wgpuSurfaceGetCapabilities" ) ,
3898
+ Err ( cause) => {
3899
+ log:: warn!( "Surface Capabilities error: {}" , cause) ;
3900
+ return native:: WGPUStatus_Error ;
3901
+ }
3897
3902
} ;
3898
3903
3899
3904
capabilities. usages =
@@ -3949,6 +3954,8 @@ pub unsafe extern "C" fn wgpuSurfaceGetCapabilities(
3949
3954
capabilities. alphaModes = std:: ptr:: null_mut ( ) ;
3950
3955
capabilities. alphaModeCount = 0 ;
3951
3956
}
3957
+
3958
+ native:: WGPUStatus_Success
3952
3959
}
3953
3960
3954
3961
#[ no_mangle]
0 commit comments