From 2288a530c3d9efbfbbaaa24d947b71f608638e22 Mon Sep 17 00:00:00 2001 From: david Date: Thu, 28 Mar 2002 16:12:26 +0000 Subject: [PATCH] Make sure that saved mouse position is reset when mouse is centred on mode change. --- src/Input/input.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Input/input.cxx b/src/Input/input.cxx index bebd60217..1009ccbd9 100644 --- a/src/Input/input.cxx +++ b/src/Input/input.cxx @@ -765,8 +765,9 @@ FGInput::_update_mouse () m.current_mode = mode; if (mode >= 0 && mode < m.nModes) { glutSetCursor(m.modes[mode].cursor); - glutWarpPointer(fgGetInt("/sim/startup/xsize", 800) / 2, - fgGetInt("/sim/startup/ysize", 600) / 2); + m.x = fgGetInt("/sim/startup/xsize", 800) / 2; + m.y = fgGetInt("/sim/startup/ysize", 600) / 2; + glutWarpPointer(m.x, m.y); } else { SG_LOG(SG_INPUT, SG_DEBUG, "Mouse mode " << mode << " out of range"); glutSetCursor(GLUT_CURSOR_INHERIT); -- 2.39.5