Silently ignore platforms that are not specified within the <number></number> section
This commit is contained in:
parent
f488051bd3
commit
b9c633721f
1 changed files with 6 additions and 1 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue