SaveScreenshot: remove unused timer
The timer is only used by the commented-out debug log methods, but the timer itself still runs. This removes the timer as well as the unused logs.
This commit is contained in:
@@ -769,9 +769,7 @@ void RageDisplay::UpdateCentering()
|
|||||||
|
|
||||||
bool RageDisplay::SaveScreenshot( const RString &sPath, GraphicsFileFormat format )
|
bool RageDisplay::SaveScreenshot( const RString &sPath, GraphicsFileFormat format )
|
||||||
{
|
{
|
||||||
RageTimer timer;
|
|
||||||
RageSurface *surface = this->CreateScreenshot();
|
RageSurface *surface = this->CreateScreenshot();
|
||||||
// LOG->Trace( "CreateScreenshot took %f seconds", timer.GetDeltaTime() );
|
|
||||||
|
|
||||||
if (nullptr == surface)
|
if (nullptr == surface)
|
||||||
{
|
{
|
||||||
@@ -790,9 +788,7 @@ bool RageDisplay::SaveScreenshot( const RString &sPath, GraphicsFileFormat forma
|
|||||||
// This used to be lrint. However, lrint causes odd resolutions like
|
// This used to be lrint. However, lrint causes odd resolutions like
|
||||||
// 639x480 (4:3) and 853x480 (16:9). ceil gives correct values. -aj
|
// 639x480 (4:3) and 853x480 (16:9). ceil gives correct values. -aj
|
||||||
int iWidth = std::ceil( iHeight * GetActualVideoModeParams().fDisplayAspectRatio );
|
int iWidth = std::ceil( iHeight * GetActualVideoModeParams().fDisplayAspectRatio );
|
||||||
timer.Touch();
|
|
||||||
RageSurfaceUtils::Zoom( surface, iWidth, iHeight );
|
RageSurfaceUtils::Zoom( surface, iWidth, iHeight );
|
||||||
// LOG->Trace( "%ix%i -> %ix%i (%.3f) in %f seconds", surface->w, surface->h, iWidth, iHeight, GetActualVideoModeParams().fDisplayAspectRatio, timer.GetDeltaTime() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RageFile out;
|
RageFile out;
|
||||||
@@ -804,7 +800,6 @@ bool RageDisplay::SaveScreenshot( const RString &sPath, GraphicsFileFormat forma
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool bSuccess = false;
|
bool bSuccess = false;
|
||||||
timer.Touch();
|
|
||||||
RString strError = "";
|
RString strError = "";
|
||||||
switch( format )
|
switch( format )
|
||||||
{
|
{
|
||||||
@@ -825,7 +820,6 @@ bool RageDisplay::SaveScreenshot( const RString &sPath, GraphicsFileFormat forma
|
|||||||
bSuccess = false;
|
bSuccess = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// LOG->Trace( "Saving Screenshot file took %f seconds.", timer.GetDeltaTime() );
|
|
||||||
|
|
||||||
RageUtil::SafeDelete( surface );
|
RageUtil::SafeDelete( surface );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user