]> git.mxchange.org Git - flightgear.git/commitdiff
- reduced amount of logging
authorcurt <curt>
Mon, 4 Jun 2001 21:15:09 +0000 (21:15 +0000)
committercurt <curt>
Mon, 4 Jun 2001 21:15:09 +0000 (21:15 +0000)
- fixed bug with incorrect modifiers for some joystick buttons; trim
  buttons now work on my system

src/Input/input.cxx

index 16f1465ffbd839b2cc36a2489126afee329f0422..47039532cb4a87b3bb2947f3a16aa583bc0c14dd 100644 (file)
@@ -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;