Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-02-12 12:33:41 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-02-12 14:05:24 +0400
commitf2af54afd0a9c3858081a5a5ef4945171a4571c4 (patch)
tree85143b1161dc40995524438785d0dcd0ad64cc86 /intern/ghost
parentb9bf935cc32d456d6d8ada8ec24fe809698d295b (diff)
NDOF/X11: skip getting the time when no ndof events are processed
Diffstat (limited to 'intern/ghost')
-rw-r--r--intern/ghost/intern/GHOST_NDOFManagerX11.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/ghost/intern/GHOST_NDOFManagerX11.cpp b/intern/ghost/intern/GHOST_NDOFManagerX11.cpp
index 468a37de633..947d8d74461 100644
--- a/intern/ghost/intern/GHOST_NDOFManagerX11.cpp
+++ b/intern/ghost/intern/GHOST_NDOFManagerX11.cpp
@@ -82,14 +82,13 @@ bool GHOST_NDOFManagerX11::processEvents()
bool anyProcessed = false;
if (m_available) {
- GHOST_TUns64 now = m_system.getMilliSeconds();
-
spnav_event e;
while (spnav_poll_event(&e)) {
switch (e.type) {
case SPNAV_EVENT_MOTION:
{
/* convert to blender view coords */
+ GHOST_TUns64 now = m_system.getMilliSeconds();
short t[3] = {(short)e.motion.x, (short)e.motion.y, (short)-e.motion.z};
short r[3] = {(short)-e.motion.rx, (short)-e.motion.ry, (short)e.motion.rz};
@@ -98,6 +97,7 @@ bool GHOST_NDOFManagerX11::processEvents()
break;
}
case SPNAV_EVENT_BUTTON:
+ GHOST_TUns64 now = m_system.getMilliSeconds();
updateButton(e.button.bnum, e.button.press, now);
break;
}