* Melchior FRANZ -- Wednesday 04 June 2003 15:11:
> * Erik Hofman -- Wednesday 04 June 2003 14:50:
> > This has crossed my mind also, but didn't think of all the consequenses.
> > This is applied to CVS now. Axes should respond real-time, buttons are 
> > restricted to one reading every 50 ms.
> 
> But not the "high" and "low" buttons (line 731 & 737). So my rudder will
> again be CPU clock rate dependent.  :-(

??

m.

Index: input.cxx
===================================================================
RCS file: /var/cvs/FlightGear-0.9/FlightGear/src/Input/input.cxx,v
retrieving revision 1.24
diff -u -p -r1.24 input.cxx
--- input.cxx   4 Jun 2003 12:46:49 -0000       1.24
+++ input.cxx   4 Jun 2003 13:13:09 -0000
@@ -726,18 +726,20 @@ FGInput::_update_joystick (double dt)
           a.bindings[modifiers][k]->fire(axis_values[j]);
       }

+      if (_last_dt > 0.05) {
                                 // 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.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 (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.

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to