Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[Mac] Call DeviceRemoved() in Dispose() event

The necessary cleanup code already exists in DeviceRemoved(). No need
to duplicate this in the Dispose() event.
  • Loading branch information...
commit a1123834a02f713ea1da8b6e83bdb5ddb0b08fa7 1 parent ab85afd
@thefiddler thefiddler authored
Showing with 7 additions and 4 deletions.
  1. +7 −4 Source/OpenTK/Platform/MacOS/HIDInput.cs
View
11 Source/OpenTK/Platform/MacOS/HIDInput.cs
@@ -1545,14 +1545,17 @@ void Dispose(bool manual)
foreach (var device in MouseDevices.Keys)
{
- NativeMethods.IOHIDDeviceRegisterInputValueCallback(
- device, IntPtr.Zero, IntPtr.Zero);
+ DeviceRemoved(IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, device);
}
foreach (var device in KeyboardDevices.Keys)
{
- NativeMethods.IOHIDDeviceRegisterInputValueCallback(
- device, IntPtr.Zero, IntPtr.Zero);
+ DeviceRemoved(IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, device);
+ }
+
+ foreach (var device in JoystickDevices.Keys)
+ {
+ DeviceRemoved(IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, device);
}
HandleDeviceAdded = null;
Please sign in to comment.
Something went wrong with that request. Please try again.