Skip to main content
GameDev.net gamedev.net
🔒 Locked

SharpDX DirectInput Mouse Position no events

Started by bogdan7 Nov 21, 2021 at 11:55 PM 0 replies 6.8k views
Original Post
bogdan7
bogdan7

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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.