Experimental tablet and pen support

This commit is contained in:
Siana Gearz
2012-02-13 20:38:44 +01:00
parent 042622b5db
commit 4cbf259ab3
2 changed files with 18 additions and 2 deletions

View File

@@ -9,6 +9,18 @@
<string>settings_rlv.xml</string>
</array>
<key>SGAbsolutePointer</key>
<map>
<key>Comment</key>
<string>Support pen tablets and absolute pointer devices by disabling mouse wrapping</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>WaterPresetName</key>
<map>
<key>Comment</key>

View File

@@ -2771,8 +2771,12 @@ void LLViewerWindow::handleScrollWheel(S32 clicks)
void LLViewerWindow::moveCursorToCenter()
{
S32 x = getWorldViewWidthScaled() / 2;
S32 y = getWorldViewHeightScaled() / 2;
if (gSavedSettings.getBOOL("SGAbsolutePointer")) {
return;
}
S32 x = getWorldViewWidthScaled() / 2;
S32 y = getWorldViewHeightScaled() / 2;
//on a forced move, all deltas get zeroed out to prevent jumping
mCurrentMousePoint.set(x,y);