mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-12-26 02:36:08 +01:00
ref: preserve aspect ratio when saving level and save shots
This commit is contained in:
parent
e39a62b1fd
commit
763e101208
@ -494,22 +494,10 @@ qboolean VID_ScreenShot( const char *filename, int shot_type )
|
||||
gEngfuncs.fsapi->AllowDirectPaths( true );
|
||||
break;
|
||||
case VID_LEVELSHOT:
|
||||
flags |= IMAGE_RESAMPLE;
|
||||
if( gpGlobals->wideScreen )
|
||||
{
|
||||
height = 480;
|
||||
width = 800;
|
||||
}
|
||||
else
|
||||
{
|
||||
height = 480;
|
||||
width = 640;
|
||||
}
|
||||
break;
|
||||
case VID_MINISHOT:
|
||||
flags |= IMAGE_RESAMPLE;
|
||||
height = 200;
|
||||
width = 320;
|
||||
height = shot_type == VID_MINISHOT ? 200 : 480;
|
||||
width = Q_rint( height * ((double)r_shot->width / r_shot->height ));
|
||||
break;
|
||||
case VID_MAPSHOT:
|
||||
flags |= IMAGE_RESAMPLE|IMAGE_QUANTIZE; // GoldSrc request overviews in 8-bit format
|
||||
|
@ -906,22 +906,10 @@ qboolean GAME_EXPORT VID_ScreenShot( const char *filename, int shot_type )
|
||||
gEngfuncs.fsapi->AllowDirectPaths( true );
|
||||
break;
|
||||
case VID_LEVELSHOT:
|
||||
flags |= IMAGE_RESAMPLE;
|
||||
if( gpGlobals->wideScreen )
|
||||
{
|
||||
height = 480;
|
||||
width = 800;
|
||||
}
|
||||
else
|
||||
{
|
||||
height = 480;
|
||||
width = 640;
|
||||
}
|
||||
break;
|
||||
case VID_MINISHOT:
|
||||
flags |= IMAGE_RESAMPLE;
|
||||
height = 200;
|
||||
width = 320;
|
||||
height = shot_type == VID_MINISHOT ? 200 : 480;
|
||||
width = Q_rint( height * ((double)r_shot->width / r_shot->height ));
|
||||
break;
|
||||
case VID_MAPSHOT:
|
||||
flags |= IMAGE_RESAMPLE|IMAGE_QUANTIZE; // GoldSrc request overviews in 8-bit format
|
||||
|
Loading…
Reference in New Issue
Block a user