When I switch to fullscreen, the mouse delta's become interspersed with zero's. The testing code is as follows (that is producing the graph below)
public void Poll(Screen screen)
{
if (mouse.Acquire().IsFailure)
return;
if (mouse.Poll().IsFailure)
return;
prevState = currState;
mouse.GetCurrentState(ref currState);
if (Result.Last.IsFailure)
return;
// ==================================
Debug.Instance.dataA.Add(currState.X);
// ==================================
And to visualize what's happening, here is an image of the mouse X values :
On the left side is the mouse x delta's while in windowed mode, whereas on the right side, in fullscreen mode, it's evident that Mouse.GetCurrentState() is returning no data (in some of the frames).
I found this :
While DirectInput forms a part of the DirectX library, it has not been significantly revised since DirectX 8 (2001-2002). Microsoft recommends that new applications make use of the Windows message loop for keyboard and mouse input instead of DirectInput (as indicated in the Meltdown 2005 slideshow[1]), and to use XInput instead of DirectInput for Xbox 360 controllers.
But I'm not sure what to make of it, because I haven't found anything else warning me against direct-input.
Does anyone know what I might be doing wrong, or is this an issue with GetCurrentState() in fullscreen ?