]> git.mxchange.org Git - flightgear.git/blobdiff - src/GUI/dialog.cxx
Add missing include files needed by the new math code under windows
[flightgear.git] / src / GUI / dialog.cxx
index 4982ec33f7da73753bc045a8aa5080c301c277cf..451cee38da02f4a7a165fe313372586f9db655d4 100644 (file)
@@ -1,5 +1,9 @@
 // dialog.cxx: implementation of an XML-configurable dialog box.
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #include <stdlib.h>            // atof()
 
 #include <Input/input.hxx>
@@ -445,9 +449,9 @@ FGDialog::display (SGPropertyNode * props)
 
     // Negative x/y coordinates are interpreted as distance from the top/right
     // corner rather than bottom/left.
-    if (px < 0)
+    if (userx && px < 0)
         px = screenw - pw + px;
-    if (py < 0)
+    if (usery && py < 0)
         py = screenh - ph + py;
 
     // Define "x", "y", "width" and/or "height" in the property tree if they