From d4f8622ff4537125c12f20e3f0b47e189c141524 Mon Sep 17 00:00:00 2001 From: mfranz Date: Mon, 5 Feb 2007 20:29:26 +0000 Subject: [PATCH] export mouse coords of "main" mouse --- src/Input/input.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Input/input.cxx b/src/Input/input.cxx index 971ffeb98..98fe85bcd 100644 --- a/src/Input/input.cxx +++ b/src/Input/input.cxx @@ -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