]> git.mxchange.org Git - flightgear.git/blobdiff - src/GUI/gui_funcs.cxx
Merge branch 'maint2' into next
[flightgear.git] / src / GUI / gui_funcs.cxx
index 833649411840f6335cd997a6b7e0c6da7132d6d8..5746111963097196a445ec44a4093d525bfbafce 100644 (file)
 
 #include <simgear/compiler.h>
 
-#ifdef HAVE_WINDOWS_H
-#  include <windows.h>
-#endif
-
-#include SG_GL_H
-
 #include <fstream>
 #include <string>
 #include <cstring>
 
 #include <stdlib.h>
 
-// for help call back
-#ifdef WIN32
-# include <shellapi.h>
-# ifdef __CYGWIN__
-#  include <sys/cygwin.h>
-# endif
-#endif
-
 #include <simgear/debug/logstream.hxx>
 #include <simgear/misc/sg_path.hxx>
 #include <simgear/screen/screen-dump.hxx>
@@ -68,7 +54,9 @@
 #  include <simgear/screen/win32-printer.h>
 #  include <simgear/screen/GlBitmaps.h>
 #endif
-
+#ifdef __MINGW32__
+#include <shellapi.h>
+#endif
 #include "gui.h"
 
 using std::string;
@@ -498,7 +486,10 @@ bool fgDumpSnapShot () {
     renderer->update( true );
     renderer->update( true );
 
-    string dir = fgGetString("/sim/paths/screenshot-dir", fgGetString("/sim/fg-current"));
+    string dir = fgGetString("/sim/paths/screenshot-dir");
+    if (dir.empty())
+        dir = fgGetString("/sim/fg-current");
+
     SGPath path(dir + '/');
     if (path.create_dir( 0755 )) {
         SG_LOG(SG_GENERAL, SG_ALERT, "Cannot create screenshot directory '"