]> git.mxchange.org Git - flightgear.git/commitdiff
Add new property indicating whether profiler is available
authorThomas Geymayer <tomgey@gmail.com>
Fri, 16 Nov 2012 11:59:44 +0000 (12:59 +0100)
committerThomas Geymayer <tomgey@gmail.com>
Fri, 16 Nov 2012 11:59:44 +0000 (12:59 +0100)
src/Main/fg_commands.cxx

index 2230d7f3a20ba0da30528374cdee79b22b783d04..ac17b7eaaa4c3a55816e7b7a5e07046ba5926f15 100644 (file)
@@ -1590,6 +1590,15 @@ fgInitCommands ()
   typedef bool (*dummy)();
   fgTie( "/command/view/next", dummy(0), do_view_next );
   fgTie( "/command/view/prev", dummy(0), do_view_prev );
+
+  SGPropertyNode* profiler_available =
+    globals->get_props()->getNode("/sim/debug/profiler-available", true);
+#ifdef FG_HAVE_GPERFTOOLS
+  profiler_available->setBoolValue(true);
+#else
+  profiler_available->setBoolValue(false);
+#endif
+  profiler_available->setAttributes(SGPropertyNode::READ);
 }
 
 // end of fg_commands.cxx