[Mac] Fixed DllEntryPointNotFound crash on device unplugging

This commit is contained in:
thefiddler 2014-01-05 04:15:30 +01:00
parent 2ee24efb2f
commit 892d129e54

View file

@ -210,7 +210,7 @@ namespace OpenTK.Platform.MacOS
if (recognized) if (recognized)
{ {
NativeMethods.IOHIDDeviceRegisterInputValueCallback(device, IntPtr.Zero, IntPtr.Zero); NativeMethods.IOHIDDeviceRegisterInputValueCallback(device, IntPtr.Zero, IntPtr.Zero);
NativeMethods.IOHIDDeviceUnscheduleWithRunLoop(device, RunLoop, InputLoopMode); NativeMethods.IOHIDDeviceUnscheduleFromRunLoop(device, RunLoop, InputLoopMode);
} }
} }
@ -849,7 +849,7 @@ namespace OpenTK.Platform.MacOS
CFString inCFRunLoopMode); CFString inCFRunLoopMode);
[DllImport(hid)] [DllImport(hid)]
public static extern void IOHIDDeviceUnscheduleWithRunLoop( public static extern void IOHIDDeviceUnscheduleFromRunLoop(
IOHIDDeviceRef device, IOHIDDeviceRef device,
CFRunLoop inCFRunLoop, CFRunLoop inCFRunLoop,
CFString inCFRunLoopMode); CFString inCFRunLoopMode);