Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fengzch-das
OIS
Commits
99ec1125
Commit
99ec1125
authored
Jul 26, 2010
by
Phillip Castaneda
Browse files
Added mouse patch
parent
21e4b332
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
src/linux/LinuxMouse.cpp
src/linux/LinuxMouse.cpp
+6
-4
No files found.
src/linux/LinuxMouse.cpp
View file @
99ec1125
...
...
@@ -172,15 +172,17 @@ void LinuxMouse::_processXEvents()
}
//Compute this frames Relative X & Y motion
mState
.
X
.
rel
=
event
.
xmotion
.
x
-
oldXMouseX
;
mState
.
Y
.
rel
=
event
.
xmotion
.
y
-
oldXMouseY
;
int
dx
=
event
.
xmotion
.
x
-
oldXMouseX
;
int
dy
=
event
.
xmotion
.
y
-
oldXMouseY
;
//Store old values for next time to compute relative motion
oldXMouseX
=
event
.
xmotion
.
x
;
oldXMouseY
=
event
.
xmotion
.
y
;
mState
.
X
.
abs
+=
mState
.
X
.
rel
;
mState
.
Y
.
abs
+=
mState
.
Y
.
rel
;
mState
.
X
.
abs
+=
dx
;
mState
.
Y
.
abs
+=
dy
;
mState
.
X
.
rel
+=
dx
;
mState
.
Y
.
rel
+=
dy
;
//Check to see if we are grabbing the mouse to the window (requires clipping and warping)
if
(
grabMouse
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment