From a8031d4b11a6f4bde488888263ed205982fc8f2e Mon Sep 17 00:00:00 2001 From: AJ Kelly Date: Fri, 23 Sep 2011 16:00:23 -0500 Subject: [PATCH] attempt to fix the resolution problem by going back to the old code --- src/StepMania.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/StepMania.cpp b/src/StepMania.cpp index ac059341b1..def1d4ff86 100644 --- a/src/StepMania.cpp +++ b/src/StepMania.cpp @@ -80,10 +80,14 @@ static Preference g_bAllowMultipleInstances( "AllowMultipleInstances", fal void StepMania::GetPreferredVideoModeParams( VideoModeParams ¶msOut ) { - // unsure if this is still going to cause first run issues. -aj - float fAspectRatio = PREFSMAN->m_fDisplayAspectRatio; - int iHeight = PREFSMAN->m_iDisplayHeight; - int iWidth = ceilf(iHeight * fAspectRatio); + // resolution handling code that probably needs fixing + int iWidth = PREFSMAN->m_iDisplayWidth; + if( PREFSMAN->m_bWindowed ) + { + //float fRatio = PREFSMAN->m_iDisplayHeight; + //iWidth = PREFSMAN->m_iDisplayHeight * fRatio; + iWidth = static_cast(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)