]> git.mxchange.org Git - flightgear.git/commitdiff
export mouse coords of "main" mouse
authormfranz <mfranz>
Mon, 5 Feb 2007 20:29:26 +0000 (20:29 +0000)
committermfranz <mfranz>
Mon, 5 Feb 2007 20:29:26 +0000 (20:29 +0000)
src/Input/input.cxx

index 971ffeb987f397109b836d63b9fee00cebf9ce4c..98fe85bcd9c63bf50271fabd58170533075076e3 100644 (file)
@@ -371,8 +371,12 @@ FGInput::doMouseMotion (int x, int y)
     if (need_warp)
       fgWarpMouse(x, y);
   }
-  m.x = x;
-  m.y = y;
+
+  if (m.x != x)
+      fgSetInt("/devices/status/mice/mouse/x", m.x = x);
+
+  if (m.y != y)
+      fgSetInt("/devices/status/mice/mouse/y", m.y = y);
 }
 
 void