]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_os_osgviewer.cxx
set /sim/fg-current to current working directory; getcwd() is defined in
[flightgear.git] / src / Main / fg_os_osgviewer.cxx
index d33da03b6a5a3d5a32383f077c75bc5c06be28b1..ccc26324bf17b0fce1b85ff585031f17c73a671b 100644 (file)
@@ -1,3 +1,8 @@
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
 #include <stdlib.h>
 
 #include <simgear/compiler.h>
@@ -8,7 +13,8 @@
 #include <osg/Group>
 #include <osg/Matrixd>
 #include <osg/Viewport>
-#include <osgViewer/StatsHandler>
+#include <osg/Version>
+#include <osgViewer/ViewerEventHandlers>
 #include <osgViewer/Viewer>
 #include <osgGA/MatrixManipulator>
 
 #include "globals.hxx"
 #include "renderer.hxx"
 
+#if ((2 <= OSG_VERSION_MAJOR) || \
+     (1 == OSG_VERSION_MAJOR) && (9 == OSG_VERSION_MINOR) &&   \
+     (8 <= OSG_VERSION_PATCH)) || \
+    ((1 == OSG_VERSION_MAJOR) && (9 < OSG_VERSION_MINOR)) ||      \
+    (1 < OSG_VERSION_MAJOR)
+#define OSG_HAS_MOUSE_CURSOR_PATCH
+#endif
+
 // fg_os implementation using OpenSceneGraph's osgViewer::Viewer class
 // to create the graphics window and run the event/update/render loop.
 //
@@ -245,7 +259,6 @@ void fgOSFullScreen()
 {
 }
 
-// #define OSG_HAS_MOUSE_CURSOR_PATCH
 #ifdef OSG_HAS_MOUSE_CURSOR_PATCH
 static void setMouseCursor(osg::Camera* camera, int cursor)
 {