1 /**************************************************************************
4 * Based on gui.cxx and renamed on 2002/08/13 by Erik Hofman.
6 * Written 1998 by Durk Talsma, started Juni, 1998. For the flight gear
9 * Additional mouse supported added by David Megginson, 1999.
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation; either version 2 of the
14 * License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26 **************************************************************************/
33 #include <simgear/compiler.h>
35 #ifdef SG_MATH_EXCEPTION_CLASH
45 #if defined(FX) && defined(XMESA)
46 # include <GL/xmesa.h>
57 # include <shellapi.h>
59 # include <sys/cygwin.h>
65 #include <simgear/constants.h>
66 #include <simgear/debug/logstream.hxx>
67 #include <simgear/misc/sg_path.hxx>
68 #include <simgear/screen/screen-dump.hxx>
70 #include <Include/general.hxx>
71 #include <Aircraft/aircraft.hxx>
72 #include <Airports/simple.hxx>
73 #include <Autopilot/auto_gui.hxx>
74 #include <Cockpit/panel.hxx>
75 #include <Controls/controls.hxx>
76 #include <FDM/flight.hxx>
77 #include <Main/main.hxx>
78 #include <Main/fg_init.hxx>
79 #include <Main/fg_io.hxx>
80 #include <Main/globals.hxx>
81 #include <Main/fg_props.hxx>
82 #include <Main/viewmgr.hxx>
84 #if defined( WIN32 ) && !defined( __CYGWIN__ ) && !defined(__MINGW32__)
85 # include <simgear/screen/win32-printer.h>
86 # include <simgear/screen/GlBitmaps.h>
90 #include "gui_local.hxx"
91 #include "preset_dlg.hxx"
92 #include "prop_picker.hxx"
93 #include "sgVec3Slider.hxx"
98 extern void fgHUDalphaAdjust( puObject * );
101 extern void fgLatLonFormatToggle( puObject *);
103 #if defined( TR_HIRES_SNAP)
104 #include <simgear/screen/tr.h>
105 extern void fgUpdateHUD( GLfloat x_start, GLfloat y_start,
106 GLfloat x_end, GLfloat y_end );
109 puDialogBox *dialogBox = 0;
110 puFrame *dialogFrame = 0;
111 puText *dialogBoxMessage = 0;
112 puOneShot *dialogBoxOkButton = 0;
114 puDialogBox *YNdialogBox = 0;
115 puFrame *YNdialogFrame = 0;
116 puText *YNdialogBoxMessage = 0;
117 puOneShot *YNdialogBoxOkButton = 0;
118 puOneShot *YNdialogBoxNoButton = 0;
120 char *gui_msg_OK; // "OK"
121 char *gui_msg_NO; // "NO"
122 char *gui_msg_YES; // "YES"
123 char *gui_msg_CANCEL; // "CANCEL"
124 char *gui_msg_RESET; // "RESET"
126 char msg_OK[] = "OK";
127 char msg_NO[] = "NO";
128 char msg_YES[] = "YES";
129 char msg_CANCEL[] = "Cancel";
130 char msg_RESET[] = "Reset";
132 char global_dialog_string[256];
134 const __fg_gui_fn_t __fg_gui_fn[] = {
137 {"saveFlight", saveFlight},
138 {"loadFlight", loadFlight},
141 {"dumpHiResSnapShot", dumpHiResSnapShot},
143 {"dumpSnapShot", dumpSnapShot},
144 #if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__)
145 {"printScreen", printScreen},
147 {"MayBeGoodBye", MayBeGoodBye},
150 {"guiTogglePanel", guiTogglePanel},
151 {"PilotOffsetAdjust", PilotOffsetAdjust},
152 {"fgHUDalphaAdjust", fgHUDalphaAdjust},
153 {"prop_pickerView", prop_pickerView},
156 {"fgPresetAirport", fgPresetAirport},
157 {"fgPresetRunway", fgPresetRunway},
158 {"fgPresetOffsetDistance", fgPresetOffsetDistance},
159 {"fgPresetAltitude", fgPresetAltitude},
160 {"fgPresetGlideslope", fgPresetGlideslope},
161 {"fgPresetAirspeed", fgPresetAirspeed},
162 {"fgPresetCommit", fgPresetCommit},
165 {"NewAltitude", NewAltitude},
166 {"NewHeading", NewHeading},
167 {"AddWayPoint", AddWayPoint},
168 {"PopWayPoint", PopWayPoint},
169 {"ClearRoute", ClearRoute},
170 {"fgLatLonFormatToggle", fgLatLonFormatToggle},
175 // Structure termination
180 /* ================ General Purpose Functions ================ */
182 void initDialog(void) {
183 // Initialize our GLOBAL GUI STRINGS
184 gui_msg_OK = msg_OK; // "OK"
185 gui_msg_NO = msg_NO; // "NO"
186 gui_msg_YES = msg_YES; // "YES"
187 gui_msg_CANCEL = msg_CANCEL; // "CANCEL"
188 gui_msg_RESET = msg_RESET; // "RESET"
191 // General Purpose Message Box
192 void mkDialog (const char *txt)
194 strncpy(global_dialog_string, txt, 256);
195 dialogBoxMessage->setLabel(global_dialog_string);
196 FG_PUSH_PUI_DIALOG( dialogBox );
199 // Message Box to report an error.
200 void guiErrorMessage (const char *txt)
202 SG_LOG(SG_GENERAL, SG_ALERT, txt);
207 // Message Box to report a throwable (usually an exception).
208 void guiErrorMessage (const char *txt, const sg_throwable &throwable)
212 msg += throwable.getFormattedMessage();
213 if (!throwable.getOrigin().empty()) {
214 msg += "\n (reported by ";
215 msg += throwable.getOrigin();
218 SG_LOG(SG_GENERAL, SG_ALERT, msg);
220 mkDialog(msg.c_str());
223 // Intercept the Escape Key
224 void ConfirmExitDialog(void)
226 FG_PUSH_PUI_DIALOG( YNdialogBox );
231 /* -----------------------------------------------------------------------
232 the Gui callback functions
233 ____________________________________________________________________*/
236 // Hier Neu :-) This is my newly added code
237 // Added by David Findlay <nedz@bigpond.com>
238 // on Sunday 3rd of December
240 // Start new Save Dialog Box
241 puDialogBox *SaveDialog = 0;
242 puFrame *SaveDialogFrame = 0;
243 puText *SaveDialogMessage = 0;
244 puInput *SaveDialogInput = 0;
246 puOneShot *SaveDialogOkButton = 0;
247 puOneShot *SaveDialogCancelButton = 0;
248 // static puOneShot *SaveDialogResetButton = 0;
250 // Default save filename
251 char saveFile[256] = "fgfs.sav";
254 void SaveDialogCancel(puObject *) {
255 FG_POP_PUI_DIALOG( SaveDialog );
258 // If press OK do this
259 void SaveDialogOk(puObject*) {
261 FG_POP_PUI_DIALOG( SaveDialog );
264 SaveDialogInput->getValue(&s);
267 // cout << saveFile << endl;
268 if (output.good() && fgSaveFlight(output)) {
270 mkDialog("Saved flight");
271 SG_LOG(SG_INPUT, SG_INFO, "Saved flight");
273 mkDialog("Cannot save flight");
274 SG_LOG(SG_INPUT, SG_ALERT, "Cannot save flight");
279 void saveFlight(puObject *cv) {
280 SaveDialog = new puDialogBox (150, 50);
282 SaveDialogFrame = new puFrame (0,0,350, 150);
284 = new puText( (150 - puGetDefaultLabelFont().getStringWidth( "File Name:" ) / 2), 110 );
285 SaveDialogMessage -> setLabel ("File Name:");
287 SaveDialogInput = new puInput (50, 70, 300, 100);
288 SaveDialogInput -> setValue (saveFile);
289 SaveDialogInput -> acceptInput();
291 SaveDialogOkButton = new puOneShot (50, 10, 110, 50);
292 SaveDialogOkButton -> setLegend (gui_msg_OK);
293 SaveDialogOkButton -> setCallback ( SaveDialogOk );
294 SaveDialogOkButton -> makeReturnDefault(TRUE);
296 SaveDialogCancelButton = new puOneShot (140, 10, 210, 50);
297 SaveDialogCancelButton -> setLegend (gui_msg_CANCEL);
298 SaveDialogCancelButton -> setCallback ( SaveDialogCancel );
300 FG_FINALIZE_PUI_DIALOG( SaveDialog );
302 SaveDialog -> reveal();
306 puDialogBox *LoadDialog = 0;
307 puFrame *LoadDialogFrame = 0;
308 puText *LoadDialogMessage = 0;
309 puInput *LoadDialogInput = 0;
311 puOneShot *LoadDialogOkButton = 0;
312 puOneShot *LoadDialogCancelButton = 0;
313 // static puOneShot *LoadDialogResetButton = 0;
315 // Default load filename
316 char loadFile[256] = "fgfs.sav";
318 // Do this if the person click okay
319 void LoadDialogOk(puObject *) {
321 FG_POP_PUI_DIALOG( LoadDialog );
324 LoadDialogInput->getValue(&l);
327 if (input.good() && fgLoadFlight(input)) {
329 mkDialog("Loaded flight");
330 SG_LOG(SG_INPUT, SG_INFO, "Restored flight");
332 mkDialog("Failed to load flight");
333 SG_LOG(SG_INPUT, SG_ALERT, "Cannot load flight");
337 // Do this if the person presses cancel
338 void LoadDialogCancel(puObject *) {
339 FG_POP_PUI_DIALOG( LoadDialog );
342 // Create Load Dialog
343 void loadFlight(puObject *cb)
345 LoadDialog = new puDialogBox (150, 50);
347 LoadDialogFrame = new puFrame (0,0,350, 150);
349 = new puText( (150 - puGetDefaultLabelFont().getStringWidth( "File Name:" ) / 2), 110 );
350 LoadDialogMessage -> setLabel ("File Name:");
352 LoadDialogInput = new puInput (50, 70, 300, 100);
353 LoadDialogInput -> setValue (loadFile);
354 LoadDialogInput -> acceptInput();
356 LoadDialogOkButton = new puOneShot (50, 10, 110, 50);
357 LoadDialogOkButton -> setLegend (gui_msg_OK);
358 LoadDialogOkButton -> setCallback ( LoadDialogOk );
359 LoadDialogOkButton -> makeReturnDefault(TRUE);
361 LoadDialogCancelButton = new puOneShot (140, 10, 210, 50);
362 LoadDialogCancelButton -> setLegend (gui_msg_CANCEL);
363 LoadDialogCancelButton -> setCallback ( LoadDialogCancel );
365 FG_FINALIZE_PUI_DIALOG( LoadDialog );
367 LoadDialog -> reveal();
370 // This is the accessor function
371 void guiTogglePanel(puObject *cb)
373 if (fgGetBool("/sim/panel/visibility"))
374 fgSetBool("/sim/panel/visibility", false);
376 fgSetBool("/sim/panel/visibility", true);
378 globals->get_renderer()->resize(fgGetInt("/sim/startup/xsize"),
379 fgGetInt("/sim/startup/ysize"));
382 void goodBye(puObject *)
384 // SG_LOG( SG_INPUT, SG_ALERT,
385 // "Program exiting normally at user request." );
386 cout << "Program exiting normally at user request." << endl;
388 // close all external I/O connections
389 globals->get_io()->shutdown_all();
395 void goAwayCb (puObject *me)
397 FG_POP_PUI_DIALOG( dialogBox );
400 void mkDialogInit (void)
402 // printf("mkDialogInit\n");
403 int x = (fgGetInt("/sim/startup/xsize")/2 - 400/2);
404 int y = (fgGetInt("/sim/startup/ysize")/2 - 100/2);
405 dialogBox = new puDialogBox (x, y); // 150, 50
407 dialogFrame = new puFrame (0,0,400,100);
408 dialogBoxMessage = new puText (10, 70);
409 dialogBoxMessage -> setLabel ("");
410 dialogBoxOkButton = new puOneShot (180, 10, 240, 50);
411 dialogBoxOkButton -> setLegend (gui_msg_OK);
412 dialogBoxOkButton -> makeReturnDefault (TRUE );
413 dialogBoxOkButton -> setCallback (goAwayCb);
415 FG_FINALIZE_PUI_DIALOG( dialogBox );
418 void MayBeGoodBye(puObject *)
423 void goAwayYesNoCb(puObject *me)
425 FG_POP_PUI_DIALOG( YNdialogBox);
428 void ConfirmExitDialogInit(void)
430 char msg[] = "Really Quit";
433 // printf("ConfirmExitDialogInit\n");
434 int len = 200 - puGetDefaultLabelFont().getStringWidth ( msg ) / 2;
436 int x = (fgGetInt("/sim/startup/xsize")/2 - 400/2);
437 int y = (fgGetInt("/sim/startup/ysize")/2 - 100/2);
439 YNdialogBox = new puDialogBox (x, y); // 150, 50
441 YNdialogFrame = new puFrame (0,0,400, 100);
443 YNdialogBoxMessage = new puText (len, 70);
444 YNdialogBoxMessage -> setDefaultValue (msg);
445 YNdialogBoxMessage -> getDefaultValue (&s);
446 YNdialogBoxMessage -> setLabel (s);
448 YNdialogBoxOkButton = new puOneShot (100, 10, 160, 50);
449 YNdialogBoxOkButton -> setLegend (gui_msg_OK);
450 YNdialogBoxOkButton -> makeReturnDefault (TRUE );
451 YNdialogBoxOkButton -> setCallback (goodBye);
453 YNdialogBoxNoButton = new puOneShot (240, 10, 300, 50);
454 YNdialogBoxNoButton -> setLegend (gui_msg_NO);
455 YNdialogBoxNoButton -> setCallback (goAwayYesNoCb);
457 FG_FINALIZE_PUI_DIALOG( YNdialogBox );
460 void notCb (puObject *)
462 mkDialog ("This function isn't implemented yet");
465 void helpCb (puObject *)
469 #if defined(FX) && !defined(WIN32)
470 # if defined(XMESA_FX_FULLSCREEN) && defined(XMESA_FX_WINDOW)
471 if ( globals->get_fullscreen() ) {
472 globals->set_fullscreen(false);
473 XMesaSetFXmode( XMESA_FX_WINDOW );
478 SGPath path( globals->get_fg_root() );
479 path.append( "Docs/index.html" );
483 string help_app = fgGetString("/sim/startup/browser-app");
485 if ( system("xwininfo -name Netscape > /dev/null 2>&1") == 0 ) {
486 command = help_app + " -remote \"openURL(" + path.str() + ")\"";
488 command = help_app + " " + path.str();
491 system( command.c_str() );
495 // Look for favorite browser
496 char Dummy[1024], ExecName[1024], browserParameter[1024];
497 char win32_name[1024];
499 cygwin32_conv_to_full_win32_path(path.c_str(),win32_name);
501 strcpy(win32_name,path.c_str());
504 FindExecutable(win32_name, Dummy, ExecName);
505 sprintf(browserParameter, "file:///%s", win32_name);
506 ShellExecute ( NULL, "open", ExecName, browserParameter, Dummy,
511 mkDialog ("Help started in your web browser window.");
514 #if defined( TR_HIRES_SNAP)
519 bool show_pu_cursor = false;
520 char *filename = new char [24];
521 static int count = 1;
523 static const SGPropertyNode *master_freeze
524 = fgGetNode("/sim/freeze/master");
526 bool freeze = master_freeze->getBoolValue();
528 fgSetBool("/sim/freeze/master", true);
531 if ( !puCursorIsHidden() ) {
532 show_pu_cursor = true;
536 FGRenderer *renderer = globals->get_renderer();
538 renderer->resize( fgGetInt("/sim/startup/xsize"),
539 fgGetInt("/sim/startup/ysize") );
541 // we need two render frames here to clear the menu and cursor
542 // ... not sure why but doing an extra fgRenderFrame() shouldn't
547 // Make sure we have SSG projection primed for current view
548 glMatrixMode(GL_MODELVIEW);
550 ssgSetCamera( (sgVec4 *)globals->get_current_view()->get_VIEW() );
551 ssgSetFOV( globals->get_current_view()->get_h_fov(),
552 globals->get_current_view()->get_v_fov() );
553 // ssgSetNearFar( 10.0f, 120000.0f );
554 ssgSetNearFar( 0.5f, 1200000.0f );
557 // This ImageSize stuff is a temporary hack
558 // should probably use 128x128 tile size and
559 // support any image size
561 // This should be a requester to get multiplier from user
563 int width = fgGetInt("/sim/startup/xsize");
564 int height = fgGetInt("/sim/startup/ysize");
566 /* allocate buffer large enough to store one tile */
567 GLubyte *tile = (GLubyte *)malloc(width * height * 3 * sizeof(GLubyte));
569 printf("Malloc of tile buffer failed!\n");
573 int imageWidth = multiplier*width;
574 int imageHeight = multiplier*height;
576 /* allocate buffer to hold a row of tiles */
578 = (GLubyte *)malloc(imageWidth * height * 3 * sizeof(GLubyte));
581 printf("Malloc of tile row buffer failed!\n");
584 TRcontext *tr = trNew();
585 trTileSize(tr, width, height, 0);
586 trTileBuffer(tr, GL_RGB, GL_UNSIGNED_BYTE, tile);
587 trImageSize(tr, imageWidth, imageHeight);
588 trRowOrder(tr, TR_TOP_TO_BOTTOM);
589 sgFrustum *frustum = ssgGetFrustum();
591 frustum->getLeft(), frustum->getRight(),
592 frustum->getBot(), frustum->getTop(),
593 frustum->getNear(), frustum->getFar());
595 /* Prepare ppm output file */
596 while (count < 1000) {
597 snprintf(filename, 24, "fgfs-screen-%03d.ppm", count++);
598 if ( (f = fopen(filename, "r")) == NULL )
602 f = fopen(filename, "wb");
604 printf("Couldn't open image file: %s\n", filename);
610 fprintf(f,"# ppm-file created by %s\n", "trdemo2");
611 fprintf(f,"%i %i\n", imageWidth, imageHeight);
614 /* just to be safe... */
615 glPixelStorei(GL_PACK_ALIGNMENT, 1);
617 /* Because the HUD and Panel change the ViewPort we will
618 * need to handle some lowlevel stuff ourselves */
619 int ncols = trGet(tr, TR_COLUMNS);
620 int nrows = trGet(tr, TR_ROWS);
622 bool do_hud = fgGetBool("/sim/hud/visibility");
623 GLfloat hud_col_step = 640.0 / ncols;
624 GLfloat hud_row_step = 480.0 / nrows;
626 bool do_panel = fgPanelVisible();
627 GLfloat panel_col_step = globals->get_current_panel()->getWidth() / ncols;
628 GLfloat panel_row_step = globals->get_current_panel()->getHeight() / nrows;
634 int curColumn = trGet(tr, TR_CURRENT_COLUMN);
635 int curRow = trGet(tr, TR_CURRENT_ROW);
636 globals->get_renderer()->screendump();
638 fgUpdateHUD( curColumn*hud_col_step, curRow*hud_row_step,
639 (curColumn+1)*hud_col_step, (curRow+1)*hud_row_step );
641 globals->get_current_panel()->update(
642 curColumn*panel_col_step, panel_col_step,
643 curRow*panel_row_step, panel_row_step );
644 more = trEndTile(tr);
646 /* save tile into tile row buffer*/
647 int curTileWidth = trGet(tr, TR_CURRENT_TILE_WIDTH);
648 int bytesPerImageRow = imageWidth * 3*sizeof(GLubyte);
649 int bytesPerTileRow = (width) * 3*sizeof(GLubyte);
650 int xOffset = curColumn * bytesPerTileRow;
651 int bytesPerCurrentTileRow = (curTileWidth) * 3*sizeof(GLubyte);
653 for (i=0;i<height;i++) {
654 memcpy(buffer + i*bytesPerImageRow + xOffset, /* Dest */
655 tile + i*bytesPerTileRow, /* Src */
656 bytesPerCurrentTileRow); /* Byte count*/
659 if (curColumn == trGet(tr, TR_COLUMNS)-1) {
660 /* write this buffered row of tiles to the file */
661 int curTileHeight = trGet(tr, TR_CURRENT_TILE_HEIGHT);
662 int bytesPerImageRow = imageWidth * 3*sizeof(GLubyte);
664 for (i=0;i<curTileHeight;i++) {
665 /* Remember, OpenGL images are bottom to top. Have to reverse. */
666 GLubyte *rowPtr = buffer + (curTileHeight-1-i) * bytesPerImageRow;
667 fwrite(rowPtr, 1, imageWidth*3, f);
673 globals->get_renderer()->resize( width, height );
679 message = "Snap shot saved to ";
681 mkDialog (message.c_str());
686 // message = "Snap shot saved to ";
687 // message += filename;
688 // mkDialog (message.c_str());
692 if ( show_pu_cursor ) {
697 fgSetBool("/sim/freeze/master", false);
700 #endif // #if defined( TR_HIRES_SNAP)
703 #if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__)
705 void rotateView( double roll, double pitch, double yaw )
711 GLubyte *hiResScreenCapture( int multiplier )
713 float oldfov = fgGetDouble("/sim/current-view/field-of-view");
714 float fov = oldfov / multiplier;
715 FGViewer *v = globals->get_current_view();
716 fgSetDouble("/sim/current-view/field-of-view", fov);
717 globals->get_renderer()->init();
718 int cur_width = fgGetInt("/sim/startup/xsize");
719 int cur_height = fgGetInt("/sim/startup/ysize");
720 if (b1) delete( b1 );
721 // New empty (mostly) bitmap
722 b1 = new GlBitmap( GL_RGB, 1, 1, (unsigned char *)"123" );
724 for ( y = 0; y < multiplier; y++ ) {
725 for ( x = 0; x < multiplier; x++ ) {
726 globals->get_renderer()->resize( cur_width, cur_height );
728 rotateView( 0, (y*fov)-((multiplier-1)*fov/2), (x*fov)-((multiplier-1)*fov/2) );
729 globals->get_renderer()->update();
732 b1->copyBitmap( &b2, cur_width*x, cur_height*y );
735 fgSetDouble("/sim/current-view/field-of-view", oldfov);
736 return b1->getBitmap();
740 #if defined( WIN32 ) && !defined( __CYGWIN__) && !defined(__MINGW32__)
741 // win32 print screen function
742 void printScreen ( puObject *obj ) {
743 bool show_pu_cursor = false;
745 if ( !puCursorIsHidden() ) {
746 show_pu_cursor = true;
751 CGlPrinter p( CGlPrinter::PRINT_BITMAP );
752 int cur_width = fgGetInt("/sim/startup/xsize");
753 int cur_height = fgGetInt("/sim/startup/ysize");
754 p.Begin( "FlightGear", cur_width*3, cur_height*3 );
755 p.End( hiResScreenCapture(3) );
758 if ( show_pu_cursor ) {
763 #endif // #ifdef WIN32
766 void dumpSnapShot ( puObject *obj ) {
771 void dumpHiResSnapShot ( puObject *obj ) {
776 // do a screen snap shot
777 void fgDumpSnapShot () {
778 bool show_pu_cursor = false;
779 char *filename = new char [24];
781 static int count = 1;
783 static const SGPropertyNode *master_freeze
784 = fgGetNode("/sim/freeze/master");
786 bool freeze = master_freeze->getBoolValue();
788 fgSetBool("/sim/freeze/master", true);
792 if ( !puCursorIsHidden() ) {
793 show_pu_cursor = true;
797 globals->get_renderer()->init();
798 globals->get_renderer()->resize( fgGetInt("/sim/startup/xsize"),
799 fgGetInt("/sim/startup/ysize") );
801 // we need two render frames here to clear the menu and cursor
802 // ... not sure why but doing an extra fgRenderFrame() shouldn't
804 globals->get_renderer()->update();
805 globals->get_renderer()->update();
807 while (count < 1000) {
809 snprintf(filename, 24, "fgfs-screen-%03d.ppm", count++);
810 if ( (fp = fopen(filename, "r")) == NULL )
815 if ( sg_glDumpWindow( filename,
816 fgGetInt("/sim/startup/xsize"),
817 fgGetInt("/sim/startup/ysize")) ) {
818 message = "Snap shot saved to ";
821 message = "Failed to save to ";
825 mkDialog (message.c_str());
829 if ( show_pu_cursor ) {
836 fgSetBool("/sim/freeze/master", false);