move DisplayAspectRatio

This commit is contained in:
Glenn Maynard
2006-01-20 22:44:28 +00:00
parent 58c79217df
commit 5f7d26addd
3 changed files with 5 additions and 4 deletions
-1
View File
@@ -159,7 +159,6 @@ PrefsManager::PrefsManager() :
m_iMovieColorDepth ( "MovieColorDepth", 16 ), m_iMovieColorDepth ( "MovieColorDepth", 16 ),
m_iMaxTextureResolution ( "MaxTextureResolution", 2048 ), m_iMaxTextureResolution ( "MaxTextureResolution", 2048 ),
m_iRefreshRate ( "RefreshRate", REFRESH_DEFAULT ), m_iRefreshRate ( "RefreshRate", REFRESH_DEFAULT ),
m_fDisplayAspectRatio ( "DisplayAspectRatio", ASPECT_AUTO ),
m_bAllowMultitexture ( "AllowMultitexture", true ), m_bAllowMultitexture ( "AllowMultitexture", true ),
m_bShowStats ( "ShowStats", TRUE_IF_DEBUG), m_bShowStats ( "ShowStats", TRUE_IF_DEBUG),
m_bShowBanners ( "ShowBanners", true ), m_bShowBanners ( "ShowBanners", true ),
-2
View File
@@ -9,7 +9,6 @@
class IniFile; class IniFile;
const int MAX_SONGS_PER_PLAY = 7; const int MAX_SONGS_PER_PLAY = 7;
#define ASPECT_AUTO -1
class PrefsManager class PrefsManager
{ {
@@ -49,7 +48,6 @@ public:
Preference<int> m_iMovieColorDepth; Preference<int> m_iMovieColorDepth;
Preference<int> m_iMaxTextureResolution; Preference<int> m_iMaxTextureResolution;
Preference<int> m_iRefreshRate; Preference<int> m_iRefreshRate;
Preference<float> m_fDisplayAspectRatio; // -1 == auto
Preference<bool> m_bAllowMultitexture; Preference<bool> m_bAllowMultitexture;
Preference<bool> m_bShowStats; Preference<bool> m_bShowStats;
Preference<bool> m_bShowBanners; Preference<bool> m_bShowBanners;
+5 -1
View File
@@ -1,6 +1,7 @@
#include "global.h" #include "global.h"
#include "ScreenDimensions.h" #include "ScreenDimensions.h"
#include "PrefsManager.h" #include "PrefsManager.h"
#include "Preference.h"
#include "LuaManager.h" #include "LuaManager.h"
#include "LuaFunctions.h" #include "LuaFunctions.h"
#include "ThemeManager.h" #include "ThemeManager.h"
@@ -25,9 +26,12 @@ static ThemeMetric<float> THEME_SCREEN_HEIGHT("Common","ScreenHeight");
*/ */
#define THEME_NATIVE_ASPECT (THEME_SCREEN_WIDTH/THEME_SCREEN_HEIGHT) #define THEME_NATIVE_ASPECT (THEME_SCREEN_WIDTH/THEME_SCREEN_HEIGHT)
#define ASPECT_AUTO -1
static Preference<float> g_fDisplayAspectRatio( "DisplayAspectRatio", ASPECT_AUTO );
float ScreenDimensions::GetScreenAspectRatio() float ScreenDimensions::GetScreenAspectRatio()
{ {
float fAspect = PREFSMAN->m_fDisplayAspectRatio; float fAspect = g_fDisplayAspectRatio;
if( fAspect == ASPECT_AUTO ) if( fAspect == ASPECT_AUTO )
{ {
/* Most PC monitor resolutions have square pixels (PAR 1:1), so the DAR /* Most PC monitor resolutions have square pixels (PAR 1:1), so the DAR