mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 06:15:30 +00:00
Add requsted changes
This commit is contained in:
parent
a68581118e
commit
52206ec13b
|
@ -173,14 +173,14 @@ namespace OpenTK.Platform.MacOS
|
|||
if (IntPtr.Size == 4)
|
||||
{
|
||||
NSPointF pf = SendPointF(receiver, selector);
|
||||
r.X.Value = *(IntPtr *)&pf.x;
|
||||
r.Y.Value = *(IntPtr *)&pf.y;
|
||||
r.X.Value = *(IntPtr *)&pf.X;
|
||||
r.Y.Value = *(IntPtr *)&pf.Y;
|
||||
}
|
||||
else
|
||||
{
|
||||
NSPointD pd = SendPointD(receiver, selector);
|
||||
r.X.Value = *(IntPtr *)&pd.x;
|
||||
r.Y.Value = *(IntPtr *)&pd.y;
|
||||
r.X.Value = *(IntPtr *)&pd.X;
|
||||
r.Y.Value = *(IntPtr *)&pd.Y;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -195,13 +195,17 @@ namespace OpenTK.Platform.MacOS
|
|||
// Using IntPtr in NSFloat cause that if imported function
|
||||
// return struct that consist of them you will get wrong data
|
||||
// This types are used for such function.
|
||||
public struct NSPointF
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct NSPointF
|
||||
{
|
||||
public float x, y;
|
||||
public float X;
|
||||
public float Y;
|
||||
}
|
||||
|
||||
public struct NSPointD
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct NSPointD
|
||||
{
|
||||
public double x, y;
|
||||
public double X;
|
||||
public double Y;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,14 +78,14 @@ namespace OpenTK.Platform.MacOS
|
|||
if (IntPtr.Size == 4)
|
||||
{
|
||||
NSPointF pf = EventGetLocationF(@event);
|
||||
r.X.Value = *(IntPtr *)&pf.x;
|
||||
r.Y.Value = *(IntPtr *)&pf.y;
|
||||
r.X.Value = *(IntPtr *)&pf.X;
|
||||
r.Y.Value = *(IntPtr *)&pf.Y;
|
||||
}
|
||||
else
|
||||
{
|
||||
NSPointD pd = EventGetLocationD(@event);
|
||||
r.X.Value = *(IntPtr *)&pd.x;
|
||||
r.Y.Value = *(IntPtr *)&pd.y;
|
||||
r.X.Value = *(IntPtr *)&pd.X;
|
||||
r.Y.Value = *(IntPtr *)&pd.Y;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue