X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInput%2Finput.cxx;h=98432a6f01803e7b43d3737015601296a27927e1;hb=f88a9aab6a097c65960e978444f64f0ea8a022a1;hp=0f39b4c37d138c8c3ed744124628b32c2ade474e;hpb=2a94cedeba61c7723036cca7bba40567aa7ea16e;p=flightgear.git diff --git a/src/Input/input.cxx b/src/Input/input.cxx index 0f39b4c37..98432a6f0 100644 --- a/src/Input/input.cxx +++ b/src/Input/input.cxx @@ -476,7 +476,12 @@ 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,n_axis); + n_axis = num_node->getIntValue(TGT_PLATFORM, -1); + + // Silently ignore platforms that are not specified within the + // section + if (n_axis < 0) + continue; } if (n_axis >= (size_t)naxes) { @@ -551,7 +556,7 @@ FGInput::_init_joystick () // cursors defined as textures referenced in the property tree. This // list could then be eliminated. -Andy // -struct { +static struct { const char * name; int cursor; } mouse_cursor_map[] = {