In the past I've done something like:
init()
{
setMousePos(screenCentre);
}
onMouseEvent()
{
movement = mousePos - screenCentre;
doStuff(movement);
setMousePos(screenCentre);
}
basically you manually set the mouse to the centre of the screen each time you get a mouse move event, after having measured the distance between the mouse and the centre of the screen.