mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-11 22:25:36 +00:00
[Win32] Implemented Mouse.SetPosition via SetCursorPos. This was refreshingly simple, the function works exactly as expected! (unlike XWarpPointer on X11)
This commit is contained in:
parent
23eaef0c70
commit
1d33d1000e
|
@ -971,6 +971,9 @@ namespace OpenTK.Platform.Windows
|
||||||
[DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)]
|
[DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)]
|
||||||
public static extern bool ClipCursor(IntPtr rcClip);
|
public static extern bool ClipCursor(IntPtr rcClip);
|
||||||
|
|
||||||
|
[DllImport("user32.dll")]
|
||||||
|
public static extern bool SetCursorPos(int X, int Y);
|
||||||
|
|
||||||
#region Async input
|
#region Async input
|
||||||
|
|
||||||
#region GetCursorPos
|
#region GetCursorPos
|
||||||
|
|
|
@ -139,7 +139,7 @@ namespace OpenTK.Platform.Windows
|
||||||
|
|
||||||
public void SetPosition(double x, double y)
|
public void SetPosition(double x, double y)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
Functions.SetCursorPos((int)x, (int)y);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -280,7 +280,7 @@ namespace OpenTK.Platform.Windows
|
||||||
|
|
||||||
public void SetPosition(double x, double y)
|
public void SetPosition(double x, double y)
|
||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
Functions.SetCursorPos((int)x, (int)y);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
Loading…
Reference in a new issue