1
0
Fork 0

Screenshot tweaks from Cameron Moore.

This commit is contained in:
curt 2001-04-22 22:04:25 +00:00
parent ffe70e3221
commit 4c4d17631f
3 changed files with 30 additions and 11 deletions

View file

@ -590,7 +590,7 @@ void TgtAptDialog_OK (puObject *)
string tmp = s;
double alt = 0.0;
int pos = tmp.find( "@" );
unsigned int pos = tmp.find( "@" );
if ( pos != string::npos ) {
TgtAptId = tmp.substr( 0, pos );
string alt_str = tmp.substr( pos + 1 );

View file

@ -984,7 +984,7 @@ void fgUpdateHUD( void ) {
int day_night_sw = global_day_night_switch;
int hud_displays = HUD_deque.size();
instr_item *pHUDInstr;
float line_width;
// float line_width;
if( !hud_displays ) { // Trust everyone, but ALWAYS cut the cards!
return;

View file

@ -525,6 +525,9 @@ void dumpSnapShot ( puObject *obj ) {
// do a screen snap shot
void fgDumpSnapShot () {
bool show_pu_cursor = false;
char *filename = new char [24];
string message;
static int count = 1;
int freeze = globals->get_freeze();
if(!freeze)
@ -542,16 +545,32 @@ void fgDumpSnapShot () {
fgGetInt("/sim/startup/ysize") );
// we need two render frames here to clear the menu and cursor
// ... not sure why but doing an extra fgFenderFrame() shoulnd't
// ... not sure why but doing an extra fgRenderFrame() shouldn't
// hurt anything
fgRenderFrame();
fgRenderFrame();
my_glDumpWindow( "fgfs-screen.ppm",
fgGetInt("/sim/startup/xsize"),
fgGetInt("/sim/startup/ysize") );
while (count < 1000) {
FILE *fp;
snprintf(filename, 24, "fgfs-screen-%03d.ppm", count++);
if ( (fp = fopen(filename, "r")) == NULL )
break;
fclose(fp);
}
mkDialog ("Snap shot saved to fgfs-screen.ppm");
if ( sg_glDumpWindow( filename,
fgGetInt("/sim/startup/xsize"),
fgGetInt("/sim/startup/ysize")) ) {
message = "Snap shot saved to ";
message += filename;
} else {
message = "Failed to save to ";
message += filename;
}
mkDialog (message.c_str());
delete [] filename;
if ( show_pu_cursor ) {
puShowCursor();