From 0dc313c955ddbc0e71a7b3fa61bc5980b379df72 Mon Sep 17 00:00:00 2001 From: curt <curt> Date: Mon, 4 Jun 2001 21:15:09 +0000 Subject: [PATCH] - reduced amount of logging - fixed bug with incorrect modifiers for some joystick buttons; trim buttons now work on my system --- src/Input/input.cxx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Input/input.cxx b/src/Input/input.cxx index 16f1465ff..47039532c 100644 --- a/src/Input/input.cxx +++ b/src/Input/input.cxx @@ -203,8 +203,8 @@ FGInput::doKey (int k, int modifiers, int x, int y) // Key pressed. if (modifiers&FG_MOD_UP == 0) { - SG_LOG(SG_INPUT, SG_INFO, "User pressed key " << k - << " with modifiers " << modifiers); + // SG_LOG(SG_INPUT, SG_INFO, "User pressed key " << k + // << " with modifiers " << modifiers); if (!b.last_state || b.is_repeatable) { const binding_list_t &bindings = _find_key_bindings(k, modifiers); @@ -219,8 +219,8 @@ FGInput::doKey (int k, int modifiers, int x, int y) // Key released. else { - SG_LOG(SG_INPUT, SG_INFO, "User released key " << k - << " with modifiers " << modifiers); + // SG_LOG(SG_INPUT, SG_INFO, "User released key " << k + // << " with modifiers " << modifiers); if (b.last_state) { const binding_list_t &bindings = _find_key_bindings(k, modifiers); @@ -732,11 +732,10 @@ FGInput::_update_joystick () } } else { // The release event is never repeated. - modifiers |= FG_MOD_UP; if (b.last_state) // SG_LOG(SG_INPUT, SG_INFO, "Button " << j << " has been released"); - for (int k = 0; k < b.bindings[modifiers].size(); k++) - b.bindings[modifiers][k].fire(); + for (int k = 0; k < b.bindings[modifiers|FG_MOD_UP].size(); k++) + b.bindings[modifiers|FG_MOD_UP][k].fire(); } b.last_state = pressed;