]> git.mxchange.org Git - flightgear.git/blobdiff - src/Autopilot/logic.cxx
Fix shared library build for metar executable
[flightgear.git] / src / Autopilot / logic.cxx
index 0b5895511ba0009abace8d47bf68f4785b7c0389..83270427dc2ec233b6971339fcb536b95e894181 100644 (file)
 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
 
+// for some obscure reason, MSVC needs this to compile
+#ifdef _MSC_VER
+#ifndef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+#include <simgear/math/SGMath.hxx>
+#endif
+
 #include "logic.hxx"
 
 using namespace FGXMLAutopilot;
@@ -44,7 +52,8 @@ void Logic::set_output( bool value )
 bool Logic::get_output() const
 {
   OutputMap::const_iterator it = _output.begin();
-  return it != _output.end() ? (*it).second->getValue() : false;
+  bool q = it != _output.end() ? (*it).second->getValue() : false;
+  return _inverted ? !q : q;
 }
 
 void Logic::update( bool firstTime, double dt )