1
0
Fork 0

Silently ignore platforms that are not specified within the <number></number> section

This commit is contained in:
ehofman 2005-01-17 10:39:55 +00:00
parent f488051bd3
commit b9c633721f

View file

@ -476,7 +476,12 @@ FGInput::_init_joystick ()
const SGPropertyNode * num_node = axis_node->getChild("number"); const SGPropertyNode * num_node = axis_node->getChild("number");
size_t n_axis = axis_node->getIndex(); size_t n_axis = axis_node->getIndex();
if (num_node != 0) { if (num_node != 0) {
n_axis = num_node->getIntValue(TGT_PLATFORM,n_axis); n_axis = num_node->getIntValue(TGT_PLATFORM, 0);
// Silently ignore platforms that are not specified within the
// <number></number> section
if (n_axis == 0)
continue;
} }
if (n_axis >= (size_t)naxes) { if (n_axis >= (size_t)naxes) {