mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-23 05:38:30 +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)
|
foreach (var device in MouseDevices.Keys)
|
||||||
{
|
{
|
||||||
NativeMethods.IOHIDDeviceRegisterInputValueCallback(
|
DeviceRemoved(IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, device);
|
||||||
device, IntPtr.Zero, IntPtr.Zero);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var device in KeyboardDevices.Keys)
|
foreach (var device in KeyboardDevices.Keys)
|
||||||
{
|
{
|
||||||
NativeMethods.IOHIDDeviceRegisterInputValueCallback(
|
DeviceRemoved(IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, device);
|
||||||
device, IntPtr.Zero, IntPtr.Zero);
|
}
|
||||||
|
|
||||||
|
foreach (var device in JoystickDevices.Keys)
|
||||||
|
{
|
||||||
|
DeviceRemoved(IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, device);
|
||||||
}
|
}
|
||||||
|
|
||||||
HandleDeviceAdded = null;
|
HandleDeviceAdded = null;
|
||||||
|
|
Loading…
Reference in a new issue