]> git.mxchange.org Git - flightgear.git/blobdiff - src/GUI/gui_funcs.cxx
Merge branch 'curt/make' into next
[flightgear.git] / src / GUI / gui_funcs.cxx
index bf418145b2fe7e74e730fcb536268efc9c67f28c..52eb06662e95582229c0cf11af4f55bd89d031bf 100644 (file)
 #include <Main/viewmgr.hxx>
 #include <GUI/new_gui.hxx>
 
-#if defined( WIN32 ) && !defined( __CYGWIN__ ) && !defined(__MINGW32__)
+#ifdef _WIN32
+#  include <shellapi.h>
+# if !defined(__MINGW32__)
 #  include <simgear/screen/win32-printer.h>
 #  include <simgear/screen/GlBitmaps.h>
-#endif
-#ifdef __MINGW32__
-#include <shellapi.h>
+# endif
 #endif
 #include "gui.h"
 
@@ -75,7 +75,7 @@ const __fg_gui_fn_t __fg_gui_fn[] = {
         {"dumpHiResSnapShot", fgHiResDumpWrapper},
 #endif
         {"dumpSnapShot", fgDumpSnapShotWrapper},
-#if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__)
+#if defined( _WIN32 ) && !defined(__MINGW32__)
         {"printScreen", printScreen},
 #endif
         // Help
@@ -170,7 +170,7 @@ void helpCb ()
     SGPath path( globals->get_fg_root() );
     path.append( "Docs/index.html" );
        
-#if !defined(WIN32)
+#ifndef _WIN32
 
     command = globals->get_browser();
     string::size_type pos;
@@ -182,7 +182,7 @@ void helpCb ()
     command += " &";
     system( command.c_str() );
 
-#else // WIN32
+#else // _WIN32
 
     // Look for favorite browser
     char Dummy[1024], ExecName[1024], browserParameter[1024];
@@ -299,6 +299,8 @@ void fgHiResDump()
     /* just to be safe... */
     glPixelStorei(GL_PACK_ALIGNMENT, 1);
 
+    // OSGFIXME
+#if 0
     /* Because the HUD and Panel change the ViewPort we will
      * need to handle some lowlevel stuff ourselves */
     int ncols = trGet(tr, TR_COLUMNS);
@@ -311,7 +313,7 @@ void fgHiResDump()
     bool do_panel = fgPanelVisible();
     GLfloat panel_col_step = globals->get_current_panel()->getWidth() / ncols;
     GLfloat panel_row_step = globals->get_current_panel()->getHeight() / nrows;
-
+#endif
     glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
     glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST);
     glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
@@ -323,7 +325,7 @@ void fgHiResDump()
     while (more) {
         trBeginTile(tr);
         int curColumn = trGet(tr, TR_CURRENT_COLUMN);
-        int curRow =  trGet(tr, TR_CURRENT_ROW);
+        // int curRow =  trGet(tr, TR_CURRENT_ROW);
 
         renderer->update( false );
         // OSGFIXME
@@ -402,7 +404,7 @@ void fgHiResDump()
 #endif // #if defined( TR_HIRES_SNAP)
 
 
-#if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__)
+#if defined( _WIN32 ) && !defined(__MINGW32__)
 
 void rotateView( double roll, double pitch, double yaw )
 {
@@ -439,7 +441,7 @@ GLubyte *hiResScreenCapture( int multiplier )
 }
 #endif
 
-#if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__)
+#if defined( _WIN32 ) && !defined(__MINGW32__)
 // win32 print screen function
 void printScreen () {
     int mouse = fgGetMouseCursor();
@@ -453,7 +455,7 @@ void printScreen () {
 
     fgSetMouseCursor(mouse);
 }
-#endif // #ifdef WIN32
+#endif // #ifdef _WIN32
 
 
 void fgDumpSnapShotWrapper () {
@@ -504,7 +506,7 @@ bool fgDumpSnapShot () {
     char filename[24];
     static int count = 1;
     while (count < 1000) {
-        snprintf(filename, 24, "fgfs-screen-%03d.ppm", count++);
+        snprintf(filename, 24, "fgfs-screen-%03d.png", count++);
 
         SGPath p(dir);
         p.append(filename);
@@ -536,8 +538,6 @@ void fgDumpSceneGraph()
     string message;
     static int count = 1;
 
-    FGRenderer *renderer = globals->get_renderer();
-
     static const SGPropertyNode *master_freeze
        = fgGetNode("/sim/freeze/master");
 
@@ -581,8 +581,6 @@ void fgDumpTerrainBranch()
     string message;
     static int count = 1;
 
-    FGRenderer *renderer = globals->get_renderer();
-
     static const SGPropertyNode *master_freeze
        = fgGetNode("/sim/freeze/master");