]> git.mxchange.org Git - flightgear.git/blobdiff - src/Scripting/nasal-props.cxx
Don't restore initial screen geometry because there is nothing in fg_os* to resize...
[flightgear.git] / src / Scripting / nasal-props.cxx
index 63ec50218f34d5b8015be0f282033761ee4bc41c..bd3f9411c93273b76793621158f1d35536c996a4 100644 (file)
@@ -1,3 +1,8 @@
+
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #include <simgear/nasal/nasal.h>
 #include <simgear/props/props.hxx>
 
@@ -150,11 +155,12 @@ static naRef f_getChild(naContext c, naRef me, int argc, naRef* args)
     naRef child = naVec_get(argv, 0);
     if(!naIsString(child)) return naNil();
     naRef idx = naNumValue(naVec_get(argv, 1));
+    bool create = naTrue(naVec_get(argv, 2));
     SGPropertyNode* n;
     if(naIsNil(idx) || !naIsNum(idx)) {
-        n = (*node)->getChild(naStr_data(child));
+        n = (*node)->getChild(naStr_data(child), create);
     } else {
-        n = (*node)->getChild(naStr_data(child), (int)idx.num);
+        n = (*node)->getChild(naStr_data(child), (int)idx.num, create);
     }
     if(!n) return naNil();
     return propNodeGhostCreate(c, n);