Rename AllowSoftwareRenderer to AllowUnacceleratedRenderer; people
seem to think SM has an internal software renderer ... Allow overriding the renderer; "Renderer=d3d".
This commit is contained in:
@@ -109,14 +109,15 @@ PrefsManager::PrefsManager()
|
||||
* already here than lots of people asking why songs aren't being displayed. */
|
||||
m_bHiddenSongs = false;
|
||||
m_bVsync = true;
|
||||
|
||||
|
||||
m_sRenderer = "";
|
||||
m_sSoundDrivers = DEFAULT_SOUND_DRIVER_LIST;
|
||||
m_fSoundVolume = DEFAULT_SOUND_VOLUME;
|
||||
/* This is experimental: let's see if preloading helps people's skipping.
|
||||
* If it doesn't do anything useful, it'll be removed. */
|
||||
m_bSoundPreloadAll = false;
|
||||
|
||||
m_bAllowSoftwareRenderer = false;
|
||||
m_bAllowUnacceleratedRenderer = false;
|
||||
|
||||
m_sDefaultNoteSkin = "default";
|
||||
|
||||
@@ -174,6 +175,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
|
||||
ini.GetValueB( "Options", "DelayedScreenLoad", m_bDelayedScreenLoad );
|
||||
ini.GetValueI( "Options", "MusicWheelUsesSections", (int&)m_MusicWheelUsesSections );
|
||||
ini.GetValueI( "Options", "MusicWheelSwitchSpeed", m_iMusicWheelSwitchSpeed );
|
||||
ini.GetValue ( "Options", "Renderer", m_sRenderer );
|
||||
ini.GetValue ( "Options", "SoundDrivers", m_sSoundDrivers );
|
||||
ini.GetValueB( "Options", "EasterEggs", m_bEasterEggs );
|
||||
ini.GetValueB( "Options", "MarvelousTiming", m_bMarvelousTiming );
|
||||
@@ -188,7 +190,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
|
||||
ini.GetValueF( "Options", "LongVerSeconds", m_fLongVerSongSeconds );
|
||||
ini.GetValueF( "Options", "MarathonVerSeconds", m_fMarathonVerSongSeconds );
|
||||
ini.GetValueI( "Options", "ShowSongOptions", (int&)m_ShowSongOptions );
|
||||
ini.GetValueB( "Options", "AllowSoftwareRenderer", m_bAllowSoftwareRenderer );
|
||||
ini.GetValueB( "Options", "AllowUnacceleratedRenderer", m_bAllowUnacceleratedRenderer );
|
||||
ini.GetValueB( "Options", "SoloSingle", m_bSoloSingle );
|
||||
ini.GetValueB( "Options", "DancePointsForOni", m_bDancePointsForOni );
|
||||
ini.GetValueB( "Options", "ShowLyrics", m_bShowLyrics );
|
||||
@@ -275,7 +277,7 @@ void PrefsManager::SaveGlobalPrefsToDisk()
|
||||
ini.SetValueF( "Options", "LongVerSeconds", m_fLongVerSongSeconds );
|
||||
ini.SetValueF( "Options", "MarathonVerSeconds", m_fMarathonVerSongSeconds );
|
||||
ini.SetValueI( "Options", "ShowSongOptions", m_ShowSongOptions );
|
||||
ini.SetValueB( "Options", "AllowSoftwareRenderer", m_bAllowSoftwareRenderer );
|
||||
ini.SetValueB( "Options", "AllowUnacceleratedRenderer", m_bAllowUnacceleratedRenderer );
|
||||
ini.SetValueB( "Options", "SoloSingle", m_bSoloSingle );
|
||||
ini.SetValueB( "Options", "DancePointsForOni", m_bDancePointsForOni );
|
||||
ini.SetValueB( "Options", "ShowLyrics", m_bShowLyrics );
|
||||
@@ -298,6 +300,8 @@ void PrefsManager::SaveGlobalPrefsToDisk()
|
||||
ini.SetValue ( "Options", "SoundDrivers", m_sSoundDrivers );
|
||||
if(m_fSoundVolume != DEFAULT_SOUND_VOLUME)
|
||||
ini.SetValueF( "Options", "SoundVolume", m_fSoundVolume );
|
||||
if(m_sRenderer != "")
|
||||
ini.SetValue ( "Options", "Renderer", m_sRenderer );
|
||||
|
||||
|
||||
ini.SetValue( "Options", "AdditionalSongFolders", join(",", m_asAdditionalSongFolders) );
|
||||
|
||||
@@ -89,10 +89,11 @@ public:
|
||||
CStringArray m_asAdditionalSongFolders;
|
||||
CString m_DWIPath;
|
||||
|
||||
CString m_sRenderer;
|
||||
CString m_sSoundDrivers;
|
||||
float m_fSoundVolume;
|
||||
bool m_bSoundPreloadAll;
|
||||
bool m_bAllowSoftwareRenderer;
|
||||
bool m_bAllowUnacceleratedRenderer;
|
||||
|
||||
enum BannerCacheType { preload_none, preload_all, preload_group };
|
||||
BannerCacheType m_BannerCacheType;
|
||||
|
||||
@@ -293,7 +293,18 @@ RageDisplay *CreateDisplay()
|
||||
for(unsigned i = 0; i < Cards.size(); ++i)
|
||||
if(Cards[i].Compare(desc)) NeedsD3D = true;
|
||||
|
||||
/* XXX: Handle AllowSoftwareRenderer. Be careful not to fall back from D3D to
|
||||
if( PREFSMAN->m_sRenderer != "" )
|
||||
{
|
||||
LOG->Warn("Forcing renderer: %s", PREFSMAN->m_sRenderer.c_str() );
|
||||
if( !PREFSMAN->m_sRenderer.CompareNoCase("opengl") )
|
||||
NeedsD3D = false;
|
||||
else if( !PREFSMAN->m_sRenderer.CompareNoCase("d3d") )
|
||||
NeedsD3D = true;
|
||||
else
|
||||
RageException::Throw("Unknown Renderer value: %s", PREFSMAN->m_sRenderer.c_str() );
|
||||
}
|
||||
|
||||
/* XXX: Handle AllowUnacceleratedRenderer. Be careful not to fall back from D3D to
|
||||
* OpenGL because of it, and ending up with an accelerated but broken driver! */
|
||||
if( NeedsD3D )
|
||||
{
|
||||
@@ -313,6 +324,9 @@ RageDisplay *CreateDisplay()
|
||||
"You can download an updated driver from your card's manufacturer.";
|
||||
};
|
||||
|
||||
if( PREFSMAN->m_sRenderer != "" )
|
||||
error = "WARNING: Renderer was forced\n\n" + error;
|
||||
|
||||
RageException::Throw( error );
|
||||
}
|
||||
|
||||
@@ -429,14 +443,14 @@ int main(int argc, char* argv[])
|
||||
BoostAppPri();
|
||||
|
||||
ResetGame();
|
||||
if( DISPLAY->IsSoftwareRenderer() && !PREFSMAN->m_bAllowSoftwareRenderer )
|
||||
if( DISPLAY->IsSoftwareRenderer() && !PREFSMAN->m_bAllowUnacceleratedRenderer )
|
||||
RageException::Throw(
|
||||
"OpenGL hardware acceleration is not available on your system.\n\n"
|
||||
"StepMania requires OpenGL hardware acceleration.\n\n"
|
||||
"Please install the latest video driver from your graphics card vendor "
|
||||
"to enable OpenGL hardware acceleration.\n\n"
|
||||
"DO NOT FILE THIS ERROR AS A BUG!\n\n"
|
||||
"(Advanced: To allow use of the software renderer, set 'AllowSoftwareRenderer=1' "
|
||||
"(Advanced: To allow use of the software renderer, set 'AllowUnacceleratedRenderer=1' "
|
||||
"in StepMania.ini)" );
|
||||
|
||||
/* Load the unlocks into memory */
|
||||
|
||||
Reference in New Issue
Block a user