]> git.mxchange.org Git - flightgear.git/commitdiff
Fix up Win32 GUI code after simgear/screen cleanup; deprecated dialog code going...
authorJames Turner <zakalawe@mac.com>
Sat, 31 Jul 2010 15:54:37 +0000 (16:54 +0100)
committerunknown <Administrator@.(none)>
Sat, 31 Jul 2010 15:56:07 +0000 (16:56 +0100)
src/GUI/gui.h
src/GUI/gui_funcs.cxx
src/GUI/menubar.cxx

index 4a02d0a5e52c8c55b2ff8dd23894ee9787c705a2..4ea7b588de5558b77bfe53c870855a1c3d79fda3 100644 (file)
@@ -60,9 +60,7 @@ extern void fgDumpSnapShotWrapper();
 extern void fgHiResDumpWrapper();
 extern void fgHiResDump();
 #endif
-#if defined( _WIN32 ) && !defined(__MINGW32__)
-extern void printScreen();
-#endif
+
 extern void helpCb();
 
 typedef struct {
index 52eb06662e95582229c0cf11af4f55bd89d031bf..ff6971549c1aee4ee53375dd35a3f5bff543618c 100644 (file)
 
 #ifdef _WIN32
 #  include <shellapi.h>
-# if !defined(__MINGW32__)
-#  include <simgear/screen/win32-printer.h>
-#  include <simgear/screen/GlBitmaps.h>
-# endif
 #endif
+
 #include "gui.h"
 
 using std::string;
@@ -75,9 +72,6 @@ const __fg_gui_fn_t __fg_gui_fn[] = {
         {"dumpHiResSnapShot", fgHiResDumpWrapper},
 #endif
         {"dumpSnapShot", fgDumpSnapShotWrapper},
-#if defined( _WIN32 ) && !defined(__MINGW32__)
-        {"printScreen", printScreen},
-#endif
         // Help
         {"helpCb", helpCb},
 
@@ -403,61 +397,6 @@ void fgHiResDump()
 }
 #endif // #if defined( TR_HIRES_SNAP)
 
-
-#if defined( _WIN32 ) && !defined(__MINGW32__)
-
-void rotateView( double roll, double pitch, double yaw )
-{
-       // rotate view
-}
-
-GlBitmap *b1 = NULL;
-GLubyte *hiResScreenCapture( int multiplier )
-{
-    float oldfov = fgGetDouble("/sim/current-view/field-of-view");
-    float fov = oldfov / multiplier;
-    FGViewer *v = globals->get_current_view();
-    fgSetDouble("/sim/current-view/field-of-view", fov);
-//     globals->get_renderer()->init();
-    int cur_width = fgGetInt("/sim/startup/xsize");
-    int cur_height = fgGetInt("/sim/startup/ysize");
-    delete( b1 );
-    // New empty (mostly) bitmap
-    b1 = new GlBitmap( GL_RGB, 1, 1, (unsigned char *)"123" );
-    int x,y;
-    for ( y = 0; y < multiplier; y++ ) {
-       for ( x = 0; x < multiplier; x++ ) {
-           globals->get_renderer()->resize( cur_width, cur_height );
-           // pan to tile
-           rotateView( 0, (y*fov)-((multiplier-1)*fov/2), (x*fov)-((multiplier-1)*fov/2) );
-           globals->get_renderer()->update( false );
-           // restore view
-           GlBitmap b2;
-           b1->copyBitmap( &b2, cur_width*x, cur_height*y );
-       }
-    }
-    fgSetDouble("/sim/current-view/field-of-view", oldfov);
-    return b1->getBitmap();
-}
-#endif
-
-#if defined( _WIN32 ) && !defined(__MINGW32__)
-// win32 print screen function
-void printScreen () {
-    int mouse = fgGetMouseCursor();
-    fgSetMouseCursor(MOUSE_CURSOR_NONE);
-
-    CGlPrinter p( CGlPrinter::PRINT_BITMAP );
-    int cur_width = fgGetInt("/sim/startup/xsize");
-    int cur_height = fgGetInt("/sim/startup/ysize");
-    p.Begin( "FlightGear", cur_width*3, cur_height*3 );
-    p.End( hiResScreenCapture(3) );
-
-    fgSetMouseCursor(mouse);
-}
-#endif // #ifdef _WIN32
-
-
 void fgDumpSnapShotWrapper () {
     fgDumpSnapShot();
 }
index 89246a5ede79a1a6c68478c7af8aa4748a6be86e..5675b14e434d2507c07d132ef0b0e4e6c927f584 100644 (file)
@@ -36,16 +36,6 @@ do_hires_snapshot_dialog (const SGPropertyNode * arg)
 }
 #endif // TR_HIRES_SNAP
 
-#if defined( _WIN32 ) && !defined(__MINGW32__)
-extern void printScreen ();
-static bool
-do_print_dialog (const SGPropertyNode * arg)
-{
-    printScreen();
-    return true;
-}
-#endif
-
 extern void helpCb ();
 static bool
 do_help_dialog (const SGPropertyNode * arg)
@@ -60,9 +50,6 @@ static struct {
 } deprecated_dialogs [] = {
 #if defined(TR_HIRES_SNAP)
     { "old-hires-snapshot-dialog", do_hires_snapshot_dialog },
-#endif
-#if defined( _WIN32 ) && !defined(__MINGW32__)
-    { "old-print-dialog", do_print_dialog },
 #endif
     { "old-help-dialog", do_help_dialog },
     { 0, 0 }