From 1913fddee00b74fcadc4ff43ef6693a9d5880435 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Tue, 12 Aug 2003 19:08:07 +0000 Subject: [PATCH] Change progressive -> interlaced. Not Xbox-only. (Avoid making RageDisplay interfaces arch-specific.) --- stepmania/src/PrefsManager.cpp | 10 +++++-- stepmania/src/PrefsManager.h | 2 +- stepmania/src/RageDisplay.h | 46 +++++++++++++++---------------- stepmania/src/RageDisplay_D3D.cpp | 2 +- stepmania/src/StepMania.cpp | 2 +- 5 files changed, 33 insertions(+), 29 deletions(-) diff --git a/stepmania/src/PrefsManager.cpp b/stepmania/src/PrefsManager.cpp index 50ac76cbe0..e6c7b5be3c 100644 --- a/stepmania/src/PrefsManager.cpp +++ b/stepmania/src/PrefsManager.cpp @@ -125,9 +125,13 @@ PrefsManager::PrefsManager() * already here than lots of people asking why songs aren't being displayed. */ m_bHiddenSongs = false; m_bVsync = true; + + /* XXX: Set these defaults for individual consoles using VideoCardDefaults.ini. */ #ifdef _XBOX - m_bProgressive = false; + m_bInterlaced = true; m_bPAL = false; +#else + m_bInterlaced = false; #endif m_sSoundDrivers = DEFAULT_SOUND_DRIVER_LIST; @@ -161,8 +165,8 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame ) return; // could not read config file, load nothing ini.GetValueB( "Options", "Windowed", m_bWindowed ); + ini.GetValueB( "Options", "Interlaced", m_bInterlaced ); #ifdef _XBOX - ini.GetValueB( "Options", "ProgressiveScan", m_bProgressive ); ini.GetValueB( "Options", "PAL", m_bPAL ); #endif ini.GetValueI( "Options", "DisplayWidth", m_iDisplayWidth ); @@ -303,8 +307,8 @@ void PrefsManager::SaveGlobalPrefsToDisk() ini.SetValueB( "Options", "DelayedEscape", m_bDelayedEscape ); ini.SetValueB( "Options", "HiddenSongs", m_bHiddenSongs ); ini.SetValueB( "Options", "Vsync", m_bVsync ); + ini.SetValueB( "Options", "Interlaced", m_bInterlaced ); #ifdef _XBOX - ini.SetValueB( "Options", "ProgressiveScan", m_bProgressive ); ini.SetValueB( "Options", "PAL", m_bPAL ); #endif ini.SetValueB( "Options", "HowToPlay", m_bInstructions ); diff --git a/stepmania/src/PrefsManager.h b/stepmania/src/PrefsManager.h index 7cc5e7c008..1625f898a7 100644 --- a/stepmania/src/PrefsManager.h +++ b/stepmania/src/PrefsManager.h @@ -34,8 +34,8 @@ public: int m_iMovieDecodeMS; bool m_bHiddenSongs; bool m_bVsync; + bool m_bInterlaced; #ifdef _XBOX - bool m_bProgressive; bool m_bPAL; #endif bool m_bDelayedTextureDelete; diff --git a/stepmania/src/RageDisplay.h b/stepmania/src/RageDisplay.h index 215714307e..e97b490e6a 100644 --- a/stepmania/src/RageDisplay.h +++ b/stepmania/src/RageDisplay.h @@ -70,33 +70,33 @@ public: // Initialize with a constructor so to guarantee all paramters // are filled (in case new params are added). VideoModeParams( - bool _windowed, - int _width, - int _height, - int _bpp, - int _rate, - bool _vsync, - bool _bAntiAliasing, - CString _sWindowTitle, - CString _sIconFile + bool windowed_, + int width_, + int height_, + int bpp_, + int rate_, + bool vsync_, + bool interlaced_, + bool bAntiAliasing_, + CString sWindowTitle_, + CString sIconFile_ #ifdef _XBOX - , bool _progressive - , bool _PAL + , bool PAL_ #endif ) { - windowed = _windowed; - width = _width; - height = _height; - bpp = _bpp; - rate = _rate; - vsync = _vsync; - bAntiAliasing = _bAntiAliasing; - sWindowTitle = _sWindowTitle; - sIconFile = _sIconFile; + windowed = windowed_; + width = width_; + height = height_; + bpp = bpp_; + rate = rate_; + vsync = vsync_; + interlaced = interlaced_; + bAntiAliasing = bAntiAliasing_; + sWindowTitle = sWindowTitle_; + sIconFile = sIconFile_; #ifdef _XBOX - progressive = _progressive; - PAL = _PAL; + PAL = PAL_; #endif } VideoModeParams() {} @@ -108,8 +108,8 @@ public: int rate; bool vsync; bool bAntiAliasing; + bool interlaced; #ifdef _XBOX - bool progressive; bool PAL; #endif CString sWindowTitle; diff --git a/stepmania/src/RageDisplay_D3D.cpp b/stepmania/src/RageDisplay_D3D.cpp index 854ff54aa6..cabe48819a 100644 --- a/stepmania/src/RageDisplay_D3D.cpp +++ b/stepmania/src/RageDisplay_D3D.cpp @@ -486,7 +486,7 @@ bool RageDisplay_D3D::TryVideoMode( VideoModeParams p, bool &bNewDeviceOut ) g_d3dpp.Flags = 0; g_d3dpp.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT; #else - g_d3dpp.Flags = (p.progressive ? D3DPRESENTFLAG_PROGRESSIVE : D3DPRESENTFLAG_INTERLACED) | D3DPRESENTFLAG_10X11PIXELASPECTRATIO; + g_d3dpp.Flags = (p.interlaced? D3DPRESENTFLAG_INTERLACED: D3DPRESENTFLAG_PROGRESSIVE ) | D3DPRESENTFLAG_10X11PIXELASPECTRATIO; g_d3dpp.FullScreen_RefreshRateInHz = p.PAL ? 50 : 60; #endif diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index a937b67ff6..3b4d1abcbf 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -106,11 +106,11 @@ static RageDisplay::VideoModeParams GetCurVideoModeParams() PREFSMAN->m_iDisplayColorDepth, PREFSMAN->m_iRefreshRate, PREFSMAN->m_bVsync, + PREFSMAN->m_bInterlaced, PREFSMAN->m_bAntiAliasing, THEME->GetMetric("Common","WindowTitle"), THEME->GetPathToG("Common window icon") #ifdef _XBOX - , PREFSMAN->m_bProgressive , PREFSMAN->m_bPAL #endif );