// 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");
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.
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;
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;