mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 12:05:33 +00:00
Wrong cast for interop when setting position(MacOS)
This commit is contained in:
parent
6440ca3cf9
commit
3f1d888ef4
|
@ -1049,8 +1049,18 @@ namespace OpenTK.Platform.MacOS
|
|||
NSPoint p = new NSPoint();
|
||||
unsafe
|
||||
{
|
||||
p.X.Value = *(IntPtr *)&x;
|
||||
p.Y.Value = *(IntPtr *)&y;
|
||||
if (IntPtr.Size == 8)
|
||||
{
|
||||
p.X.Value = *(IntPtr *)&x;
|
||||
p.Y.Value = *(IntPtr *)&y;
|
||||
}
|
||||
else
|
||||
{
|
||||
float f1 = (float)x;
|
||||
float f2 = (float)y;
|
||||
p.X.Value = *(IntPtr *)&f1;
|
||||
p.Y.Value = *(IntPtr *)&f2;
|
||||
}
|
||||
}
|
||||
|
||||
CG.WarpMouseCursorPosition(p);
|
||||
|
|
Loading…
Reference in a new issue