mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-02-02 10:31:05 +00:00
[Mac] Correctly unschedule HIDManager from run loop
This commit is contained in:
parent
4c7f6a92a7
commit
7388bd935d
|
@ -818,6 +818,12 @@ namespace OpenTK.Platform.MacOS
|
||||||
CFRunLoop inCFRunLoop,
|
CFRunLoop inCFRunLoop,
|
||||||
CFString inCFRunLoopMode);
|
CFString inCFRunLoopMode);
|
||||||
|
|
||||||
|
[DllImport(hid)]
|
||||||
|
public static void IOHIDManagerUnscheduleFromRunLoop(
|
||||||
|
IOHIDManagerRef inIOHIDManagerRef,
|
||||||
|
CFRunLoop inCFRunLoop,
|
||||||
|
CFString inCFRunLoopMode);
|
||||||
|
|
||||||
[DllImport(hid)]
|
[DllImport(hid)]
|
||||||
public static extern void IOHIDManagerSetDeviceMatching(
|
public static extern void IOHIDManagerSetDeviceMatching(
|
||||||
IOHIDManagerRef manager,
|
IOHIDManagerRef manager,
|
||||||
|
@ -1468,8 +1474,8 @@ namespace OpenTK.Platform.MacOS
|
||||||
hidmanager, IntPtr.Zero, IntPtr.Zero);
|
hidmanager, IntPtr.Zero, IntPtr.Zero);
|
||||||
NativeMethods.IOHIDManagerRegisterDeviceRemovalCallback(
|
NativeMethods.IOHIDManagerRegisterDeviceRemovalCallback(
|
||||||
hidmanager, IntPtr.Zero, IntPtr.Zero);
|
hidmanager, IntPtr.Zero, IntPtr.Zero);
|
||||||
NativeMethods.IOHIDManagerScheduleWithRunLoop(
|
NativeMethods.IOHIDManagerUnscheduleFromRunLoop(
|
||||||
hidmanager, IntPtr.Zero, IntPtr.Zero);
|
hidmanager, RunLoop, InputLoopMode);
|
||||||
|
|
||||||
foreach (var device in MouseDevices.Keys)
|
foreach (var device in MouseDevices.Keys)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue