mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-26 03:45:39 +00:00
Added PointToClient and PointToScreen functions. Changed default input driver implementation from RawInput to WMInput due to invalid RawInput data.
This commit is contained in:
parent
37c4576fcc
commit
2f4afe34f5
|
@ -28,7 +28,7 @@ namespace OpenTK.Platform.Windows
|
||||||
#region --- Fields ---
|
#region --- Fields ---
|
||||||
|
|
||||||
private DisplayMode mode = new DisplayMode();
|
private DisplayMode mode = new DisplayMode();
|
||||||
private WinRawInput driver;
|
private IInputDriver driver;
|
||||||
|
|
||||||
//private bool fullscreen;
|
//private bool fullscreen;
|
||||||
private bool disposed;
|
private bool disposed;
|
||||||
|
@ -342,7 +342,8 @@ namespace OpenTK.Platform.Windows
|
||||||
public void OnCreate(EventArgs e)
|
public void OnCreate(EventArgs e)
|
||||||
{
|
{
|
||||||
this.window = new WindowInfo(this);
|
this.window = new WindowInfo(this);
|
||||||
driver = new WinRawInput(this.window);
|
//driver = new WinRawInput(this.window); // Disabled until the mouse issues are resolved.
|
||||||
|
driver = new WMInput(this.window);
|
||||||
|
|
||||||
Debug.Print("Window created: {0}", window);
|
Debug.Print("Window created: {0}", window);
|
||||||
|
|
||||||
|
@ -388,6 +389,27 @@ namespace OpenTK.Platform.Windows
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region PointToClient
|
||||||
|
|
||||||
|
public void PointToClient(ref System.Drawing.Point p)
|
||||||
|
{
|
||||||
|
if (!Functions.ScreenToClient(this.Handle, ref p))
|
||||||
|
throw new InvalidOperationException(String.Format(
|
||||||
|
"Could not convert point {0} from client to screen coordinates. Windows error: {1}",
|
||||||
|
p.ToString(), Marshal.GetLastWin32Error()));
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region PointToScreen
|
||||||
|
|
||||||
|
public void PointToScreen(ref System.Drawing.Point p)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region --- IResizable Members ---
|
#region --- IResizable Members ---
|
||||||
|
|
Loading…
Reference in a new issue