Commit dc76f817 authored by Viktor Legodzinski's avatar Viktor Legodzinski
Browse files

fix: Make VEH funcs only available on windows

parent 15765cf2
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -319,6 +319,8 @@ public static unsafe class PInvokeInterface
        }

        // Get function pointers and create delegates
        if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
        {
            ph2_veh_create_ptr = GetDelegate<ph2_veh_create_delegate>(handle, "ph2_veh_create");
            ph2_veh_destructor_ptr = GetDelegate<ph2_veh_destructor_delegate>(handle, "ph2_veh_destructor");
            ph2_veh_hook_address_ptr = GetDelegate<ph2_veh_hook_address_delegate>(handle, "ph2_veh_hook_address");
@@ -326,6 +328,7 @@ public static unsafe class PInvokeInterface
            ph2_veh_unhook_ptr = GetDelegate<ph2_veh_unhook_delegate>(handle, "ph2_veh_unhook");
            ph2_veh_EventException_AddListener_ptr = GetDelegate<ph2_veh_EventException_AddListener_delegate>(handle, "ph2_veh_EventException_AddListener");
            ph2_veh_EventUnhandledException_AddListener_ptr = GetDelegate<ph2_veh_EventUnhandledException_AddListener_delegate>(handle, "ph2_veh_EventUnhandledException_AddListener");
        }

        ph2_ILCallback_create_ptr = GetDelegate<ph2_ILCallback_create_delegate>(handle, "ph2_ILCallback_create");
        ph2_ILCallback_destructor_ptr = GetDelegate<ph2_ILCallback_destructor_delegate>(handle, "ph2_ILCallback_destructor");