Fix screenshot crash.
This commit is contained in:
@@ -635,9 +635,14 @@ bool RageDisplay::SaveScreenshot( CString sPath, GraphicsFileFormat format )
|
|||||||
if( format != SAVE_LOSSLESS )
|
if( format != SAVE_LOSSLESS )
|
||||||
{
|
{
|
||||||
/* Maintain the DAR. */
|
/* Maintain the DAR. */
|
||||||
int iWidth = lrintf( 640 / GetActualVideoModeParams().fDisplayAspectRatio );
|
float fDAR = GetActualVideoModeParams().fDisplayAspectRatio;
|
||||||
LOG->Trace( "%ix%i -> %ix%i (%.3f)", surface->w, surface->h, 640, iWidth, GetActualVideoModeParams().fDisplayAspectRatio );
|
|
||||||
RageSurfaceUtils::Zoom( surface, 640, iWidth );
|
// -1 seems to be a sentinel
|
||||||
|
if( fDAR < 0.0f )
|
||||||
|
fDAR = 4.0f/3.0f;
|
||||||
|
int iHeight = lrintf( 640 / fDAR );
|
||||||
|
LOG->Trace( "%ix%i -> %ix%i (%.3f)", surface->w, surface->h, 640, iHeight, fDAR );
|
||||||
|
RageSurfaceUtils::Zoom( surface, 640, iHeight );
|
||||||
}
|
}
|
||||||
|
|
||||||
RageFile out;
|
RageFile out;
|
||||||
|
|||||||
Reference in New Issue
Block a user