[Opentnl-cvs] tnl/zap winJoystick.cpp,1.7,1.8
Brought to you by:
mark_frohnmayer,
s_alanet
From: Ben G. <s_a...@us...> - 2004-05-09 22:17:54
|
Update of /cvsroot/opentnl/tnl/zap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21206/zap Modified Files: winJoystick.cpp Log Message: Fixed issue with out-of-control window movement in relation to the mouse lock functionality. Index: winJoystick.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/winJoystick.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** winJoystick.cpp 7 May 2004 22:59:11 -0000 1.7 --- winJoystick.cpp 9 May 2004 22:17:28 -0000 1.8 *************** *** 56,59 **** --- 56,67 ---- GetCursorPos(&cp); + // Check our position in the window; if we're close to the top (within 32px) then ignore + // same if we're within 5px of the edges. That way we can avoid going crazy when + // people try to resize/drag the window. + if(cp.x - r.top < 32) return; + if(cp.y - r.left < 5) return; + if(r.right - cp.y < 5) return; + if(r.bottom - cp.x < 5) return; + S32 centerX = (r.right + r.left) >> 1; S32 centerY = (r.bottom + r.top) >> 1; |