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

The necessary cleanup code already exists in DeviceRemoved(). No need
to duplicate this in the Dispose() event.
This commit is contained in:
thefiddler 2014-01-05 22:38:26 +01:00
parent ab85afd5ba
commit a1123834a0

View file

@ -1545,14 +1545,17 @@ namespace OpenTK.Platform.MacOS
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;