File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
unity-native-plugin-vulkan/src Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -10,10 +10,12 @@ define_unity_interface!(
1010 0x9789313dfcffcc87_u64
1111) ;
1212
13- pub type VulkanInitCallback = UnityVulkanInitCallback ;
14-
15- #[ allow( non_camel_case_types) ]
16- pub type PFN_vkGetInstanceProcAddr = unity_native_plugin_sys:: PFN_vkGetInstanceProcAddr ;
13+ pub type VulkanInitCallback = Option <
14+ unsafe extern "system" fn (
15+ get_instance_proc_addr : ash:: vk:: PFN_vkGetInstanceProcAddr ,
16+ userdata : * mut :: std:: os:: raw:: c_void ,
17+ ) -> Option < ash:: vk:: PFN_vkGetInstanceProcAddr > ,
18+ > ;
1719
1820pub struct VulkanInstance {
1921 native : UnityVulkanInstance ,
@@ -237,7 +239,7 @@ impl UnityGraphicsVulkan {
237239 ) {
238240 self . interface ( )
239241 . InterceptInitialization
240- . expect ( "InterceptInitialization" ) ( func, userdata) ;
242+ . expect ( "InterceptInitialization" ) ( std :: mem :: transmute ( func) , userdata) ;
241243 }
242244
243245 pub unsafe fn intercept_vulkan_api (
You can’t perform that action at this time.
0 commit comments