- Timestamp:
- Mar 14, 2011, 3:53:38 AM (14 years ago)
- Location:
- code/branches/kicklib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/kicklib
-
code/branches/kicklib/src/external/ois/linux/LinuxMouse.cpp
r5781 r8071 173 173 174 174 //Compute this frames Relative X & Y motion 175 mState.X.rel= event.xmotion.x - oldXMouseX;176 mState.Y.rel= event.xmotion.y - oldXMouseY;175 int dx = event.xmotion.x - oldXMouseX; 176 int dy = event.xmotion.y - oldXMouseY; 177 177 178 178 //Store old values for next time to compute relative motion … … 180 180 oldXMouseY = event.xmotion.y; 181 181 182 mState.X.abs += mState.X.rel; 183 mState.Y.abs += mState.Y.rel; 182 mState.X.abs += dx; 183 mState.Y.abs += dy; 184 mState.X.rel += dx; 185 mState.Y.rel += dy; 184 186 185 187 //Check to see if we are grabbing the mouse to the window (requires clipping and warping)
Note: See TracChangeset
for help on using the changeset viewer.