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:
+1
-7
@@ -769,10 +769,8 @@ void RageDisplay::UpdateCentering()
|
||||
|
||||
bool RageDisplay::SaveScreenshot( const RString &sPath, GraphicsFileFormat format )
|
||||
{
|
||||
RageTimer timer;
|
||||
RageSurface *surface = this->CreateScreenshot();
|
||||
// LOG->Trace( "CreateScreenshot took %f seconds", timer.GetDeltaTime() );
|
||||
|
||||
|
||||
if (nullptr == surface)
|
||||
{
|
||||
LOG->Warn("SaveScreenshot: failed to create a screenshot surface");
|
||||
@@ -790,9 +788,7 @@ bool RageDisplay::SaveScreenshot( const RString &sPath, GraphicsFileFormat forma
|
||||
// This used to be lrint. However, lrint causes odd resolutions like
|
||||
// 639x480 (4:3) and 853x480 (16:9). ceil gives correct values. -aj
|
||||
int iWidth = std::ceil( iHeight * GetActualVideoModeParams().fDisplayAspectRatio );
|
||||
timer.Touch();
|
||||
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;
|
||||
@@ -804,7 +800,6 @@ bool RageDisplay::SaveScreenshot( const RString &sPath, GraphicsFileFormat forma
|
||||
}
|
||||
|
||||
bool bSuccess = false;
|
||||
timer.Touch();
|
||||
RString strError = "";
|
||||
switch( format )
|
||||
{
|
||||
@@ -825,7 +820,6 @@ bool RageDisplay::SaveScreenshot( const RString &sPath, GraphicsFileFormat forma
|
||||
bSuccess = false;
|
||||
break;
|
||||
}
|
||||
// LOG->Trace( "Saving Screenshot file took %f seconds.", timer.GetDeltaTime() );
|
||||
|
||||
RageUtil::SafeDelete( surface );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user