mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-25 18:25:30 +00:00
* Platform/MacOS/CarbonBindings/CarbonAPI.cs:
Added support for mouse delta events.
This commit is contained in:
parent
7f0212a5fe
commit
96791683d0
|
@ -714,17 +714,31 @@ namespace OpenTK.Platform.MacOS.Carbon
|
||||||
unsafe
|
unsafe
|
||||||
{
|
{
|
||||||
HIPoint* parm = &point;
|
HIPoint* parm = &point;
|
||||||
|
|
||||||
OSStatus result = API.GetEventParameter(inEvent,
|
OSStatus result = API.GetEventParameter(inEvent,
|
||||||
EventParamName.WindowMouseLocation, EventParamType.typeHIPoint, IntPtr.Zero,
|
EventParamName.WindowMouseLocation, EventParamType.typeHIPoint, IntPtr.Zero,
|
||||||
(uint)System.Runtime.InteropServices.Marshal.SizeOf(typeof(HIPoint)), IntPtr.Zero,
|
(uint)System.Runtime.InteropServices.Marshal.SizeOf(typeof(HIPoint)), IntPtr.Zero,
|
||||||
(IntPtr)parm);
|
(IntPtr)parm);
|
||||||
|
|
||||||
pt = point;
|
pt = point;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static internal OSStatus GetEventMouseDelta(IntPtr inEvent, out HIPoint pt)
|
||||||
|
{
|
||||||
|
HIPoint point;
|
||||||
|
|
||||||
|
unsafe
|
||||||
|
{
|
||||||
|
HIPoint* parm = &point;
|
||||||
|
OSStatus result = API.GetEventParameter(inEvent,
|
||||||
|
EventParamName.MouseDelta, EventParamType.typeHIPoint, IntPtr.Zero,
|
||||||
|
(uint)System.Runtime.InteropServices.Marshal.SizeOf(typeof(HIPoint)), IntPtr.Zero,
|
||||||
|
(IntPtr)parm);
|
||||||
|
pt = point;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static internal OSStatus GetEventWindowRef(IntPtr inEvent, out IntPtr windowRef)
|
static internal OSStatus GetEventWindowRef(IntPtr inEvent, out IntPtr windowRef)
|
||||||
|
|
Loading…
Reference in a new issue