fixed issue #477 (Wrong mouse coordinates when using OpenGL3 RenderSystem)
This commit is contained in:
parent
403fc7064a
commit
c553c15792
@ -64,6 +64,7 @@ namespace ANX.InputSystem.Windows.XInput
|
||||
{
|
||||
class Mouse : IMouse
|
||||
{
|
||||
#region Interop
|
||||
[DllImport("user32.dll")]
|
||||
static extern bool GetCursorPos(ref Point lpPoint);
|
||||
|
||||
@ -73,9 +74,14 @@ namespace ANX.InputSystem.Windows.XInput
|
||||
[DllImport("user32.dll")]
|
||||
static extern bool ScreenToClient(IntPtr hWnd, ref Point lpPoint);
|
||||
|
||||
#endregion // Interop
|
||||
|
||||
#region Private Members
|
||||
private DirectInput directInput;
|
||||
private MouseX mouse;
|
||||
|
||||
|
||||
#endregion // Private Members
|
||||
|
||||
public IntPtr WindowHandle
|
||||
{
|
||||
get;
|
||||
|
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using NLog;
|
||||
using ANX.Framework.Input;
|
||||
|
||||
|
||||
#region License
|
||||
@ -82,6 +83,9 @@ namespace ANX.Framework.Windows.GL3
|
||||
logger.Info("creating a new GameWindow");
|
||||
gameWindow = new WindowsGameWindow();
|
||||
|
||||
Mouse.WindowHandle = this.gameWindow.Handle; //TODO: find a way to initialize all InputSystems with one Handle
|
||||
Keyboard.WindowHandle = this.gameWindow.Handle;
|
||||
|
||||
logger.Info("hook up GameWindow events");
|
||||
gameWindow.Activated += delegate
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user