Oops, don't forget that the axisnumber can actually be 0
This commit is contained in:
parent
b9c633721f
commit
f88a9aab6a
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue