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.master
parent
9a4d075f3b
commit
540752ff2d
|
|
@ -2377,6 +2377,17 @@
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>DisableMouseWarp</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Disable warping of the mouse to the center of the screen during alt-zoom and mouse look. Useful with certain input devices, mouse sharing programs like Synergy, or running under Parallels.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>DisableRendering</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue