]> git.mxchange.org Git - flightgear.git/commitdiff
Property node patches by David Megginson.
authorcurt <curt>
Tue, 12 Jun 2001 05:18:43 +0000 (05:18 +0000)
committercurt <curt>
Tue, 12 Jun 2001 05:18:43 +0000 (05:18 +0000)
src/FDM/flight.cxx
src/GUI/gui.cxx
src/Input/fgjs.cxx

index 46fb72403b6444bd6a982d63574e06bab8140e05..06eb44db1ddb222d02f9e0b17f298da4b8c54ad6 100644 (file)
@@ -209,7 +209,7 @@ FGInterface::init ()
 
                                // Set initial velocities
   SG_LOG(SG_FLIGHT, SG_INFO, "...initializing velocities...");
-  if (!fgHasValue("/sim/startup/speed-set")) {
+  if (!fgHasNode("/sim/startup/speed-set")) {
     set_V_calibrated_kts(0.0);
   } else {
     const string speedset = fgGetString("/sim/startup/speed-set");
index 845585c0e7bf9d841947e0ed822597c8d28bdb66..ae8dd1abe07d45ebdf9383102a2f2827c2694989 100644 (file)
@@ -763,7 +763,7 @@ void guiInit()
     puSetDefaultFonts( GuiFont, GuiFont ) ;
     guiFnt = puGetDefaultLabelFont();
   
-    if (!fgHasValue("/sim/startup/mouse-pointer")) {
+    if (!fgHasNode("/sim/startup/mouse-pointer")) {
         // no preference specified for mouse pointer, attempt to autodetect...
         // Determine if we need to render the cursor, or if the windowing
         // system will do it.  First test if we are rendering with glide.
index d875aff38ccd333dcf5d251aef806b051c6e69c7..e9ed0aa72639f3f77482279780617f0cdf87f9f0 100644 (file)
@@ -84,8 +84,8 @@ void waitForButton(jsSuper *jss, int wait_ms) {
 
 void writeAxisProperties(fstream &fs, int control,int joystick, int axis) {
      
-     char jsDesc[25];
-     snprintf(jsDesc,25,"--prop:/input/joysticks/js[%d]/axis[%d]",joystick,axis);
+     char jsDesc[40];
+     snprintf(jsDesc,40,"--prop:/input/joysticks/js[%d]/axis[%d]",joystick,axis);
      fs << jsDesc  << "/control=" << axes_propnames[control] << endl; 
      
      fs << jsDesc << "/dead-band=0.02"  << endl; 
@@ -102,8 +102,8 @@ void writeAxisProperties(fstream &fs, int control,int joystick, int axis) {
 
 void writeButtonProperties(fstream &fs, int property,int joystick, int button) {
      
-     char jsDesc[25];
-     snprintf(jsDesc,25,"--prop:/input/joysticks/js%d/button[%d]",joystick,button);
+     char jsDesc[40];
+     snprintf(jsDesc,40,"--prop:/input/joysticks/js[%d]/button[%d]",joystick,button);
      
      fs << jsDesc << "/action=adjust" << endl; 
      fs << jsDesc << "/control=" << button_propnames[property] << endl;