From 2f764eb319fdb77e22d3141dbe9b482c1792f4d7 Mon Sep 17 00:00:00 2001 From: ehofman Date: Sun, 28 Dec 2003 17:42:26 +0000 Subject: [PATCH] Make sure the mouse mode can be overriden by a commandline option --- src/Input/input.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Input/input.cxx b/src/Input/input.cxx index 5d2f207d8..1527373e5 100644 --- a/src/Input/input.cxx +++ b/src/Input/input.cxx @@ -616,8 +616,11 @@ FGInput::_init_mouse () // Grab node pointers char buf[64]; sprintf(buf, "/devices/status/mice/mouse[%d]/mode", i); - m.mode_node = fgGetNode(buf, true); - m.mode_node->setIntValue(0); + m.mode_node = fgGetNode(buf); + if (m.mode_node == NULL) { + m.mode_node = fgGetNode(buf, true); + m.mode_node->setIntValue(0); + } for (j = 0; j < MAX_MOUSE_BUTTONS; j++) { sprintf(buf, "/devices/status/mice/mouse[%d]/button[%d]", i, j); m.mouse_button_nodes[j] = fgGetNode(buf, true); -- 2.39.5