Hi, I developed a FPS game about 8 years ago using SDLDotNet. It worked fine until recently. Something must have changed in some builtin API (it could be my Windows version).
My FPS works by hiding the mouse cursor and re-centering it at each frame (so the cursor doesn't leave the window), however, when I recenter the mouse cursor, it fires an even that moves the mouse in the opposite direction, so my movement is cancelled. I tried many things like ignoring the event when the X and Y are the same as the center position but it didn't work. It seems that re-centering the mouse cursor is done on multiple intermediate frames.
Could I get low level handle on the mouse motion instead? Are there other tricks I could use? Here's a sample of my code:
public void OnMouseMotion(object sender, MouseMotionEventArgs args)
{
short relativeX = (short)(inputState.CurrentX - args.X);
short relativeY = (short)(inputState.CurrentY - args.Y);
inputState.CurrentX = args.X;
inputState.CurrentY = args.Y;
inputState.MouseMotionX = relativeX;
inputState.MouseMotionY = relativeY;
Cursor.Position = screenCenterPosition;
}