]> git.mxchange.org Git - flightgear.git/blobdiff - src/Input/input.cxx
Oops, don't forget that the axisnumber can actually be 0
[flightgear.git] / src / Input / input.cxx
index f0d5a192d0484b0c1accaff82432a3d1b1cf615d..98432a6f01803e7b43d3737015601296a27927e1 100644 (file)
@@ -476,11 +476,11 @@ FGInput::_init_joystick ()
       const SGPropertyNode * num_node = axis_node->getChild("number");
       size_t n_axis = axis_node->getIndex();
       if (num_node != 0) {
-          n_axis = num_node->getIntValue(TGT_PLATFORM, 0);
+          n_axis = num_node->getIntValue(TGT_PLATFORM, -1);
 
           // Silently ignore platforms that are not specified within the
           // <number></number> section
-          if (n_axis == 0)
+          if (n_axis < 0)
              continue;
       }