[Wgois-cvsmail] SF.net SVN: wgois:[15] ois/trunk/src/linux/LinuxMouse.cpp
Moved to Github https://github.com/wgois/OIS
Brought to you by:
pjcast,
theonlyjoey
From: <pj...@us...> - 2010-07-26 01:34:08
|
Revision: 15 http://wgois.svn.sourceforge.net/wgois/?rev=15&view=rev Author: pjcast Date: 2010-07-26 01:34:00 +0000 (Mon, 26 Jul 2010) Log Message: ----------- Added mouse patch Modified Paths: -------------- ois/trunk/src/linux/LinuxMouse.cpp Modified: ois/trunk/src/linux/LinuxMouse.cpp =================================================================== --- ois/trunk/src/linux/LinuxMouse.cpp 2010-07-26 01:28:41 UTC (rev 14) +++ ois/trunk/src/linux/LinuxMouse.cpp 2010-07-26 01:34:00 UTC (rev 15) @@ -172,15 +172,17 @@ } //Compute this frames Relative X & Y motion - mState.X.rel = event.xmotion.x - oldXMouseX; - mState.Y.rel = event.xmotion.y - oldXMouseY; + int dx = event.xmotion.x - oldXMouseX; + int dy = event.xmotion.y - oldXMouseY; //Store old values for next time to compute relative motion oldXMouseX = event.xmotion.x; oldXMouseY = event.xmotion.y; - mState.X.abs += mState.X.rel; - mState.Y.abs += mState.Y.rel; + mState.X.abs += dx; + 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) if( grabMouse ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |