summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-01-29 16:46:06 +0200
committerVadim Savchuk <vsavchuk@productengine.com>2010-01-29 16:46:06 +0200
commitdb4e46e93d06c03520cb7c781b8e41b6d374414d (patch)
tree05bbd6186f1008afec9baae673a8e8126d2573ad /indra/newview/llviewerwindow.cpp
parentd66d9afae1c7cd4484b72532c0103ce7a4db9e77 (diff)
parent53173419000ba1d14aa99c59353e91f700915e07 (diff)
Mere from default branch
--HG-- branch : product-engine
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 c70b830782..cd6b9e2c50 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2262,15 +2262,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);
+ }
}