Commit 99ec1125 authored by Phillip Castaneda's avatar Phillip Castaneda
Browse files

Added mouse patch

parent 21e4b332
...@@ -172,15 +172,17 @@ void LinuxMouse::_processXEvents() ...@@ -172,15 +172,17 @@ void LinuxMouse::_processXEvents()
} }
//Compute this frames Relative X & Y motion //Compute this frames Relative X & Y motion
mState.X.rel = event.xmotion.x - oldXMouseX; int dx = event.xmotion.x - oldXMouseX;
mState.Y.rel = event.xmotion.y - oldXMouseY; int dy = event.xmotion.y - oldXMouseY;
//Store old values for next time to compute relative motion //Store old values for next time to compute relative motion
oldXMouseX = event.xmotion.x; oldXMouseX = event.xmotion.x;
oldXMouseY = event.xmotion.y; oldXMouseY = event.xmotion.y;
mState.X.abs += mState.X.rel; mState.X.abs += dx;
mState.Y.abs += mState.Y.rel; mState.Y.abs += dy;
mState.X.rel += dx;
mState.Y.rel += dy;
//Check to see if we are grabbing the mouse to the window (requires clipping and warping) //Check to see if we are grabbing the mouse to the window (requires clipping and warping)
if( grabMouse ) if( grabMouse )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment