]> git.mxchange.org Git - flightgear.git/blobdiff - src/Network/jpg-httpd.cxx
Revert "Fix compilation problem with MSVC 2012"
[flightgear.git] / src / Network / jpg-httpd.cxx
index 9c83d3446686a731377e5772bbedef14ca2b8409..b1ba76dc1f7a4589242369caa5ca53e639ad1540 100644 (file)
@@ -31,9 +31,9 @@
 
 #include <simgear/compiler.h>
 
-#include <stdlib.h>            // atoi() atof()
+#include <cstdlib>             // atoi() atof()
 
-#include STL_STRING
+#include <cstring>
 
 #include <simgear/debug/logstream.hxx>
 #include <simgear/io/iochannel.hxx>
@@ -42,7 +42,7 @@
 
 #include <Main/fg_props.hxx>
 #include <Main/globals.hxx>
-#include <Main/renderer.hxx>
+#include <Viewer/renderer.hxx>
 
 #include "jpg-httpd.hxx"
 
 #define __HTTP_GET_STRING           "GET "
 
 #include <osgUtil/SceneView>
+#include <osgViewer/Viewer>
 extern osg::ref_ptr<osgUtil::SceneView> sceneView;
 
-SG_USING_STD(string);
+using std::string;
 
 
 bool FGJpegHttpd::open() {
@@ -74,7 +75,7 @@ bool FGJpegHttpd::open() {
 
 
 bool FGJpegHttpd::process() {
-    netChannel::poll();
+    simgear::NetChannel::poll();
 
     return true;
 }
@@ -108,14 +109,9 @@ void HttpdImageChannel :: foundTerminator( void ) {
 
         double left, right, bottom, top, zNear, zFar;
        osgViewer::Viewer* viewer = globals->get_renderer()->getViewer();
-       if (viewer)
-           viewer->getCamera()->getProjectionMatrixAsFrustum(left, right,
-                                                             bottom, top,
-                                                             zNear, zFar);
-       else
-           sceneView->getCamera()->getProjectionMatrixAsFrustum(left, right,
-                                                                bottom, top,
-                                                                zNear, zFar);
+        viewer->getCamera()->getProjectionMatrixAsFrustum(left, right,
+                                                          bottom, top,
+                                                          zNear, zFar);
         JpgFactory->setFrustum( left, right, bottom, top, zNear, zFar );
 
         nImageLen  = JpgFactory -> render();