Disable automatic aspect ratio guessing, default to 854x480 (16:9 because most newer displays are wide).
This commit is contained in:
@@ -146,7 +146,7 @@ bool g_bAutoRestart = false;
|
||||
void ValidateDisplayAspectRatio( float &val )
|
||||
{
|
||||
if( val < 0 )
|
||||
val = 4/3.f;
|
||||
val = 16/9.f;
|
||||
}
|
||||
|
||||
void ValidateSongsPerPlay( int &val )
|
||||
@@ -162,9 +162,9 @@ PrefsManager::PrefsManager() :
|
||||
m_sDefaultModifiers ( "DefaultModifiers", "" ),
|
||||
|
||||
m_bWindowed ( "Windowed", true ),
|
||||
m_iDisplayWidth ( "DisplayWidth", 640 ),
|
||||
m_iDisplayWidth ( "DisplayWidth", 854 ),
|
||||
m_iDisplayHeight ( "DisplayHeight", 480 ),
|
||||
m_fDisplayAspectRatio ( "DisplayAspectRatio", 4/3.f, ValidateDisplayAspectRatio ),
|
||||
m_fDisplayAspectRatio ( "DisplayAspectRatio", 16/9.f, ValidateDisplayAspectRatio ),
|
||||
m_iDisplayColorDepth ( "DisplayColorDepth", 16 ),
|
||||
m_iTextureColorDepth ( "TextureColorDepth", 16 ),
|
||||
m_iMovieColorDepth ( "MovieColorDepth", 16 ),
|
||||
|
||||
+6
-4
@@ -87,19 +87,21 @@ void StepMania::GetPreferredVideoModeParams( VideoModeParams ¶msOut )
|
||||
* When windowed (no monitor stretching), we will tweak the width so that
|
||||
* we get square pixels.
|
||||
* -Chris */
|
||||
/*
|
||||
// TODO: This is broken. Needs fix. -Colby
|
||||
int iWidth = PREFSMAN->m_iDisplayWidth;
|
||||
if( PREFSMAN->m_bWindowed )
|
||||
{
|
||||
//float fRatio = PREFSMAN->m_iDisplayWidth / PREFSMAN->m_iDisplayHeight;
|
||||
//iWidth = PREFSMAN->m_iDisplayHeight * fRatio;
|
||||
// float fRatio = PREFSMAN->m_iDisplayHeight ;
|
||||
// iWidth = PREFSMAN->m_iDisplayHeight * fRatio;
|
||||
iWidth = static_cast<int>(ceilf(PREFSMAN->m_iDisplayHeight * PREFSMAN->m_fDisplayAspectRatio));
|
||||
}
|
||||
|
||||
*/
|
||||
// todo: allow for PRODUCT_ID + "-" + CommonMetrics::WINDOW_TITLE as
|
||||
// a theme option (Midi requested it, AJ had the idea for making it optional)
|
||||
paramsOut = VideoModeParams(
|
||||
PREFSMAN->m_bWindowed,
|
||||
iWidth,
|
||||
PREFSMAN->m_iDisplayWidth,
|
||||
PREFSMAN->m_iDisplayHeight,
|
||||
PREFSMAN->m_iDisplayColorDepth,
|
||||
PREFSMAN->m_iRefreshRate,
|
||||
|
||||
Reference in New Issue
Block a user