From c086f3e0e519af9e8899ff53ddf7807782085f17 Mon Sep 17 00:00:00 2001 From: curt Date: Tue, 12 Jun 2001 05:18:43 +0000 Subject: [PATCH] Property node patches by David Megginson. --- src/FDM/flight.cxx | 2 +- src/GUI/gui.cxx | 2 +- src/Input/fgjs.cxx | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/FDM/flight.cxx b/src/FDM/flight.cxx index 46fb72403..06eb44db1 100644 --- a/src/FDM/flight.cxx +++ b/src/FDM/flight.cxx @@ -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"); diff --git a/src/GUI/gui.cxx b/src/GUI/gui.cxx index 845585c0e..ae8dd1abe 100644 --- a/src/GUI/gui.cxx +++ b/src/GUI/gui.cxx @@ -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. diff --git a/src/Input/fgjs.cxx b/src/Input/fgjs.cxx index d875aff38..e9ed0aa72 100644 --- a/src/Input/fgjs.cxx +++ b/src/Input/fgjs.cxx @@ -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; -- 2.39.5