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:
@@ -110,13 +110,14 @@ PrefsManager::PrefsManager()
|
|||||||
m_bHiddenSongs = false;
|
m_bHiddenSongs = false;
|
||||||
m_bVsync = true;
|
m_bVsync = true;
|
||||||
|
|
||||||
|
m_sRenderer = "";
|
||||||
m_sSoundDrivers = DEFAULT_SOUND_DRIVER_LIST;
|
m_sSoundDrivers = DEFAULT_SOUND_DRIVER_LIST;
|
||||||
m_fSoundVolume = DEFAULT_SOUND_VOLUME;
|
m_fSoundVolume = DEFAULT_SOUND_VOLUME;
|
||||||
/* This is experimental: let's see if preloading helps people's skipping.
|
/* This is experimental: let's see if preloading helps people's skipping.
|
||||||
* If it doesn't do anything useful, it'll be removed. */
|
* If it doesn't do anything useful, it'll be removed. */
|
||||||
m_bSoundPreloadAll = false;
|
m_bSoundPreloadAll = false;
|
||||||
|
|
||||||
m_bAllowSoftwareRenderer = false;
|
m_bAllowUnacceleratedRenderer = false;
|
||||||
|
|
||||||
m_sDefaultNoteSkin = "default";
|
m_sDefaultNoteSkin = "default";
|
||||||
|
|
||||||
@@ -174,6 +175,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
|
|||||||
ini.GetValueB( "Options", "DelayedScreenLoad", m_bDelayedScreenLoad );
|
ini.GetValueB( "Options", "DelayedScreenLoad", m_bDelayedScreenLoad );
|
||||||
ini.GetValueI( "Options", "MusicWheelUsesSections", (int&)m_MusicWheelUsesSections );
|
ini.GetValueI( "Options", "MusicWheelUsesSections", (int&)m_MusicWheelUsesSections );
|
||||||
ini.GetValueI( "Options", "MusicWheelSwitchSpeed", m_iMusicWheelSwitchSpeed );
|
ini.GetValueI( "Options", "MusicWheelSwitchSpeed", m_iMusicWheelSwitchSpeed );
|
||||||
|
ini.GetValue ( "Options", "Renderer", m_sRenderer );
|
||||||
ini.GetValue ( "Options", "SoundDrivers", m_sSoundDrivers );
|
ini.GetValue ( "Options", "SoundDrivers", m_sSoundDrivers );
|
||||||
ini.GetValueB( "Options", "EasterEggs", m_bEasterEggs );
|
ini.GetValueB( "Options", "EasterEggs", m_bEasterEggs );
|
||||||
ini.GetValueB( "Options", "MarvelousTiming", m_bMarvelousTiming );
|
ini.GetValueB( "Options", "MarvelousTiming", m_bMarvelousTiming );
|
||||||
@@ -188,7 +190,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
|
|||||||
ini.GetValueF( "Options", "LongVerSeconds", m_fLongVerSongSeconds );
|
ini.GetValueF( "Options", "LongVerSeconds", m_fLongVerSongSeconds );
|
||||||
ini.GetValueF( "Options", "MarathonVerSeconds", m_fMarathonVerSongSeconds );
|
ini.GetValueF( "Options", "MarathonVerSeconds", m_fMarathonVerSongSeconds );
|
||||||
ini.GetValueI( "Options", "ShowSongOptions", (int&)m_ShowSongOptions );
|
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", "SoloSingle", m_bSoloSingle );
|
||||||
ini.GetValueB( "Options", "DancePointsForOni", m_bDancePointsForOni );
|
ini.GetValueB( "Options", "DancePointsForOni", m_bDancePointsForOni );
|
||||||
ini.GetValueB( "Options", "ShowLyrics", m_bShowLyrics );
|
ini.GetValueB( "Options", "ShowLyrics", m_bShowLyrics );
|
||||||
@@ -275,7 +277,7 @@ void PrefsManager::SaveGlobalPrefsToDisk()
|
|||||||
ini.SetValueF( "Options", "LongVerSeconds", m_fLongVerSongSeconds );
|
ini.SetValueF( "Options", "LongVerSeconds", m_fLongVerSongSeconds );
|
||||||
ini.SetValueF( "Options", "MarathonVerSeconds", m_fMarathonVerSongSeconds );
|
ini.SetValueF( "Options", "MarathonVerSeconds", m_fMarathonVerSongSeconds );
|
||||||
ini.SetValueI( "Options", "ShowSongOptions", m_ShowSongOptions );
|
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", "SoloSingle", m_bSoloSingle );
|
||||||
ini.SetValueB( "Options", "DancePointsForOni", m_bDancePointsForOni );
|
ini.SetValueB( "Options", "DancePointsForOni", m_bDancePointsForOni );
|
||||||
ini.SetValueB( "Options", "ShowLyrics", m_bShowLyrics );
|
ini.SetValueB( "Options", "ShowLyrics", m_bShowLyrics );
|
||||||
@@ -298,6 +300,8 @@ void PrefsManager::SaveGlobalPrefsToDisk()
|
|||||||
ini.SetValue ( "Options", "SoundDrivers", m_sSoundDrivers );
|
ini.SetValue ( "Options", "SoundDrivers", m_sSoundDrivers );
|
||||||
if(m_fSoundVolume != DEFAULT_SOUND_VOLUME)
|
if(m_fSoundVolume != DEFAULT_SOUND_VOLUME)
|
||||||
ini.SetValueF( "Options", "SoundVolume", m_fSoundVolume );
|
ini.SetValueF( "Options", "SoundVolume", m_fSoundVolume );
|
||||||
|
if(m_sRenderer != "")
|
||||||
|
ini.SetValue ( "Options", "Renderer", m_sRenderer );
|
||||||
|
|
||||||
|
|
||||||
ini.SetValue( "Options", "AdditionalSongFolders", join(",", m_asAdditionalSongFolders) );
|
ini.SetValue( "Options", "AdditionalSongFolders", join(",", m_asAdditionalSongFolders) );
|
||||||
|
|||||||
@@ -89,10 +89,11 @@ public:
|
|||||||
CStringArray m_asAdditionalSongFolders;
|
CStringArray m_asAdditionalSongFolders;
|
||||||
CString m_DWIPath;
|
CString m_DWIPath;
|
||||||
|
|
||||||
|
CString m_sRenderer;
|
||||||
CString m_sSoundDrivers;
|
CString m_sSoundDrivers;
|
||||||
float m_fSoundVolume;
|
float m_fSoundVolume;
|
||||||
bool m_bSoundPreloadAll;
|
bool m_bSoundPreloadAll;
|
||||||
bool m_bAllowSoftwareRenderer;
|
bool m_bAllowUnacceleratedRenderer;
|
||||||
|
|
||||||
enum BannerCacheType { preload_none, preload_all, preload_group };
|
enum BannerCacheType { preload_none, preload_all, preload_group };
|
||||||
BannerCacheType m_BannerCacheType;
|
BannerCacheType m_BannerCacheType;
|
||||||
|
|||||||
@@ -293,7 +293,18 @@ RageDisplay *CreateDisplay()
|
|||||||
for(unsigned i = 0; i < Cards.size(); ++i)
|
for(unsigned i = 0; i < Cards.size(); ++i)
|
||||||
if(Cards[i].Compare(desc)) NeedsD3D = true;
|
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! */
|
* OpenGL because of it, and ending up with an accelerated but broken driver! */
|
||||||
if( NeedsD3D )
|
if( NeedsD3D )
|
||||||
{
|
{
|
||||||
@@ -313,6 +324,9 @@ RageDisplay *CreateDisplay()
|
|||||||
"You can download an updated driver from your card's manufacturer.";
|
"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 );
|
RageException::Throw( error );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -429,14 +443,14 @@ int main(int argc, char* argv[])
|
|||||||
BoostAppPri();
|
BoostAppPri();
|
||||||
|
|
||||||
ResetGame();
|
ResetGame();
|
||||||
if( DISPLAY->IsSoftwareRenderer() && !PREFSMAN->m_bAllowSoftwareRenderer )
|
if( DISPLAY->IsSoftwareRenderer() && !PREFSMAN->m_bAllowUnacceleratedRenderer )
|
||||||
RageException::Throw(
|
RageException::Throw(
|
||||||
"OpenGL hardware acceleration is not available on your system.\n\n"
|
"OpenGL hardware acceleration is not available on your system.\n\n"
|
||||||
"StepMania requires OpenGL hardware acceleration.\n\n"
|
"StepMania requires OpenGL hardware acceleration.\n\n"
|
||||||
"Please install the latest video driver from your graphics card vendor "
|
"Please install the latest video driver from your graphics card vendor "
|
||||||
"to enable OpenGL hardware acceleration.\n\n"
|
"to enable OpenGL hardware acceleration.\n\n"
|
||||||
"DO NOT FILE THIS ERROR AS A BUG!\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)" );
|
"in StepMania.ini)" );
|
||||||
|
|
||||||
/* Load the unlocks into memory */
|
/* Load the unlocks into memory */
|
||||||
|
|||||||
Reference in New Issue
Block a user