Add the axis buttons to the list of items to check only once every 50 ms.
This commit is contained in:
parent
560fd191ac
commit
bc767b9bba
1 changed files with 13 additions and 11 deletions
|
@ -727,17 +727,19 @@ FGInput::_update_joystick (double dt)
|
|||
}
|
||||
|
||||
// do we have to emulate axis buttons?
|
||||
if (a.low.bindings[modifiers].size())
|
||||
_update_button(_joystick_bindings[i].axes[j].low,
|
||||
modifiers,
|
||||
axis_values[j] < a.low_threshold,
|
||||
-1, -1);
|
||||
|
||||
if (a.high.bindings[modifiers].size())
|
||||
_update_button(_joystick_bindings[i].axes[j].high,
|
||||
modifiers,
|
||||
axis_values[j] > a.high_threshold,
|
||||
-1, -1);
|
||||
if (_last_dt > 0.05) {
|
||||
if (a.low.bindings[modifiers].size())
|
||||
_update_button(_joystick_bindings[i].axes[j].low,
|
||||
modifiers,
|
||||
axis_values[j] < a.low_threshold,
|
||||
-1, -1);
|
||||
|
||||
if (a.high.bindings[modifiers].size())
|
||||
_update_button(_joystick_bindings[i].axes[j].high,
|
||||
modifiers,
|
||||
axis_values[j] > a.high_threshold,
|
||||
-1, -1);
|
||||
}
|
||||
}
|
||||
|
||||
// Fire bindings for the buttons.
|
||||
|
|
Loading…
Reference in a new issue