- Timestamp:
- Oct 7, 2010, 8:21:33 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ois_update/src/external/ois/linux/LinuxMouse.cpp
r5781 r7506 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.