mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-24 18:35:32 +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)]
|
||||
public static extern bool ClipCursor(IntPtr rcClip);
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
public static extern bool SetCursorPos(int X, int Y);
|
||||
|
||||
#region Async input
|
||||
|
||||
#region GetCursorPos
|
||||
|
|
|
@ -139,7 +139,7 @@ namespace OpenTK.Platform.Windows
|
|||
|
||||
public void SetPosition(double x, double y)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
Functions.SetCursorPos((int)x, (int)y);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -280,7 +280,7 @@ namespace OpenTK.Platform.Windows
|
|||
|
||||
public void SetPosition(double x, double y)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
Functions.SetCursorPos((int)x, (int)y);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
Loading…
Reference in a new issue