summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorLynx Linden <lynx@lindenlab.com>2010-01-29 10:27:15 +0000
committerLynx Linden <lynx@lindenlab.com>2010-01-29 10:27:15 +0000
commit540752ff2dcaaf565e8a9dff93079816ef572312 (patch)
treeb7199a2f8ca4cca71c5810d50d946a0814280d3e /indra/newview/llviewerwindow.cpp
parent9a4d075f3b8ab1ccf760187beeb81f9bf17e69b1 (diff)
DEV-41686: Added a DisableMouseWarp debug option.
Turning this option on makes alt-zooming and mouselook actually work when using Synergy. I believe this will also make it work for certain input devices, and Parallels, that control your cursor by setting its position in absolute coordinates.
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--indra/newview/llviewerwindow.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index b4c73dba26..8692cdcc57 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2269,15 +2269,18 @@ void LLViewerWindow::handleScrollWheel(S32 clicks)
void LLViewerWindow::moveCursorToCenter()
{
- S32 x = getWorldViewWidthScaled() / 2;
- S32 y = getWorldViewHeightScaled() / 2;
+ if (! gSavedSettings.getBOOL("DisableMouseWarp"))
+ {
+ S32 x = getWorldViewWidthScaled() / 2;
+ S32 y = getWorldViewHeightScaled() / 2;
- //on a forced move, all deltas get zeroed out to prevent jumping
- mCurrentMousePoint.set(x,y);
- mLastMousePoint.set(x,y);
- mCurrentMouseDelta.set(0,0);
+ //on a forced move, all deltas get zeroed out to prevent jumping
+ mCurrentMousePoint.set(x,y);
+ mLastMousePoint.set(x,y);
+ mCurrentMouseDelta.set(0,0);
- LLUI::setMousePositionScreen(x, y);
+ LLUI::setMousePositionScreen(x, y);
+ }
}