Fix a rounding bug that effected screenshots and resolutions.
Previously, you may have gotten values like 639x480 (4:3) or 853x480 (16:9). These are due to rounding errors caused by lrintf; ceilf does what we really want. [RageDisplay.cpp] modified screenshot function [ScreenDimensions] modified SCREEN_WIDTH and SCREEN_HEIGHT algorithms (no longer do you need to SCREEN_WIDTH+1 for 16:9 support) [StepMania.cpp] modified windowed mode width calculation
This commit is contained in:
+3
-5
@@ -103,11 +103,9 @@ void StepMania::GetPreferredVideoModeParams( VideoModeParams ¶msOut )
|
||||
int iWidth = PREFSMAN->m_iDisplayWidth;
|
||||
if( PREFSMAN->m_bWindowed )
|
||||
{
|
||||
/*
|
||||
float fRatio = PREFSMAN->m_iDisplayWidth / PREFSMAN->m_iDisplayHeight;
|
||||
iWidth = PREFSMAN->m_iDisplayHeight * fRatio;
|
||||
*/
|
||||
iWidth = PREFSMAN->m_iDisplayHeight * PREFSMAN->m_fDisplayAspectRatio;
|
||||
//float fRatio = PREFSMAN->m_iDisplayWidth / PREFSMAN->m_iDisplayHeight;
|
||||
//iWidth = PREFSMAN->m_iDisplayHeight * fRatio;
|
||||
iWidth = ceilf(PREFSMAN->m_iDisplayHeight * PREFSMAN->m_fDisplayAspectRatio);
|
||||
}
|
||||
|
||||
paramsOut = VideoModeParams(
|
||||
|
||||
Reference in New Issue
Block a user