add m_bHalveTextureHeight for 8:3 displays
This commit is contained in:
@@ -218,6 +218,7 @@ PrefsManager::PrefsManager()
|
||||
m_bHideDefaultNoteSkin = false;
|
||||
m_iMaxHighScoresPerList = 10;
|
||||
m_fPadStickSeconds = 0;
|
||||
m_bHalveTextureHeight = false;
|
||||
g_bAutoRestart = false;
|
||||
m_bSignProfileData = false;
|
||||
|
||||
@@ -506,6 +507,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk()
|
||||
ini.GetValue( "Options", "HideDefaultNoteSkin", m_bHideDefaultNoteSkin );
|
||||
ini.GetValue( "Options", "MaxHighScoresPerList", m_iMaxHighScoresPerList );
|
||||
ini.GetValue( "Options", "PadStickSeconds", m_fPadStickSeconds );
|
||||
ini.GetValue( "Options", "HalveTextureHeight", m_bHalveTextureHeight );
|
||||
ini.GetValue( "Options", "AutoRestart", g_bAutoRestart );
|
||||
ini.GetValue( "Options", "SignProfileData", m_bSignProfileData );
|
||||
|
||||
@@ -725,6 +727,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() const
|
||||
ini.SetValue( "Options", "HideDefaultNoteSkin", m_bHideDefaultNoteSkin );
|
||||
ini.SetValue( "Options", "MaxHighScoresPerList", m_iMaxHighScoresPerList );
|
||||
ini.SetValue( "Options", "PadStickSeconds", m_fPadStickSeconds );
|
||||
ini.SetValue( "Options", "HalveTextureHeight", m_bHalveTextureHeight );
|
||||
ini.SetValue( "Options", "AutoRestart", g_bAutoRestart );
|
||||
ini.SetValue( "Options", "SignProfileData", m_bSignProfileData );
|
||||
|
||||
|
||||
@@ -198,6 +198,11 @@ public:
|
||||
// after pressed.
|
||||
float m_fPadStickSeconds;
|
||||
|
||||
// For 8:3 displays (640x240 arcade monitors), every odd line of texels
|
||||
// doesn't get drawn. This makes text look really ugly. So, squash all
|
||||
// textures to half height to match the aspect ratio of the display.
|
||||
float m_bHalveTextureHeight;
|
||||
|
||||
// If true, then signatures created when writing profile data
|
||||
// and verified when reading profile data. Leave this false if
|
||||
// you want to use a profile on different machines that don't
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "RageDisplay.h"
|
||||
#include "RageTypes.h"
|
||||
#include "arch/ArchHooks/ArchHooks.h"
|
||||
#include "PrefsManager.h"
|
||||
|
||||
#include "SDL.h"
|
||||
#include "SDL_endian.h"
|
||||
@@ -178,6 +179,9 @@ apply_color_key:
|
||||
m_iImageWidth = min( m_iSourceWidth, actualID.iMaxSize );
|
||||
m_iImageHeight = min( m_iSourceHeight, actualID.iMaxSize );
|
||||
|
||||
if( PREFSMAN->m_bHalveTextureHeight )
|
||||
m_iImageHeight /= 2;
|
||||
|
||||
/* Texture dimensions need to be a power of two; jump to the next. */
|
||||
m_iTextureWidth = power_of_two(m_iImageWidth);
|
||||
m_iTextureHeight = power_of_two(m_iImageHeight);
|
||||
|
||||
Reference in New Issue
Block a user