1
0
Fork 0

Make sure the mouse mode can be overriden by a commandline option

This commit is contained in:
ehofman 2003-12-28 17:42:26 +00:00
parent 4cc853e2a2
commit 2f764eb319

View file

@ -616,8 +616,11 @@ FGInput::_init_mouse ()
// Grab node pointers // Grab node pointers
char buf[64]; char buf[64];
sprintf(buf, "/devices/status/mice/mouse[%d]/mode", i); sprintf(buf, "/devices/status/mice/mouse[%d]/mode", i);
m.mode_node = fgGetNode(buf, true); m.mode_node = fgGetNode(buf);
m.mode_node->setIntValue(0); if (m.mode_node == NULL) {
m.mode_node = fgGetNode(buf, true);
m.mode_node->setIntValue(0);
}
for (j = 0; j < MAX_MOUSE_BUTTONS; j++) { for (j = 0; j < MAX_MOUSE_BUTTONS; j++) {
sprintf(buf, "/devices/status/mice/mouse[%d]/button[%d]", i, j); sprintf(buf, "/devices/status/mice/mouse[%d]/button[%d]", i, j);
m.mouse_button_nodes[j] = fgGetNode(buf, true); m.mouse_button_nodes[j] = fgGetNode(buf, true);