mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 10:25:33 +00:00
Fix interop for wheel events
This commit is contained in:
parent
6440ca3cf9
commit
fc5c7be51a
|
@ -138,13 +138,17 @@ namespace OpenTK.Platform.MacOS
|
|||
[DllImport(LibObjC, EntryPoint="objc_msgSend_fpret")]
|
||||
extern static float SendFloat_i386(IntPtr receiver, IntPtr selector);
|
||||
|
||||
// On x64 using selector that return CGFloat give you 64 bit == double
|
||||
[DllImport(LibObjC, EntryPoint="objc_msgSend")]
|
||||
extern static float SendFloat_normal(IntPtr receiver, IntPtr selector);
|
||||
extern static double SendFloat_x64(IntPtr receiver, IntPtr selector);
|
||||
|
||||
[DllImport(LibObjC, EntryPoint="objc_msgSend")]
|
||||
extern static float SendFloat_ios(IntPtr receiver, IntPtr selector);
|
||||
|
||||
public static float SendFloat(IntPtr receiver, IntPtr selector)
|
||||
{
|
||||
#if IOS
|
||||
return SendFloat_normal(receiver, selector);
|
||||
return SendFloat_ios(receiver, selector);
|
||||
#else
|
||||
if (IntPtr.Size == 4)
|
||||
{
|
||||
|
@ -152,7 +156,7 @@ namespace OpenTK.Platform.MacOS
|
|||
}
|
||||
else
|
||||
{
|
||||
return SendFloat_normal(receiver, selector);
|
||||
return (float)SendFloat_x64(receiver, selector);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue