SharpDX DirectInput Mouse Position no events

Started by
0 comments, last by bogdan7 2 years, 6 months ago

I tried:

RenderInitialize(){
	DirectInput InputManager = new DirectInput();
}
RenderLoop(){
	Mouse mouse = new Mouse(InputManager);
	MouseState mouseState = new MouseState
	mouse.Acquire();
	mouse.getCurrentState(ref mouseState);
	Console.WriteLine("X: " + mouseState.X + " Y: " + mouseState.Y);
}

It prints (0, 0) always no matter where I place the mouse.

This topic is closed to new replies.

Advertisement