SDL2: do not use silly math in rel mode

This commit is contained in:
Alam Ed Arias 2016-06-07 16:59:32 -04:00
parent 70ce9421e4
commit 246e0c21be

View file

@ -749,7 +749,12 @@ static void Impl_HandleMouseMotionEvent(SDL_MouseMotionEvent evt)
return;
}
if ((evt.x == realwidth/2) && (evt.y == realheight/2))
if (!wrapmouseok)
{
event.data2 = evt.xrel;
event.data3 = evt.yrel;
}
else if ((evt.x == realwidth/2) && (evt.y == realheight/2))
{
return;
}