mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 19:45:29 +00:00
[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:
parent
ab85afd5ba
commit
a1123834a0
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue