move movie driver pref into arch.cpp
This commit is contained in:
@@ -299,7 +299,6 @@ PrefsManager::PrefsManager() :
|
|||||||
m_iSoundDevice ( "SoundDevice", "" ),
|
m_iSoundDevice ( "SoundDevice", "" ),
|
||||||
m_iSoundPreferredSampleRate ( "SoundPreferredSampleRate", 44100 ),
|
m_iSoundPreferredSampleRate ( "SoundPreferredSampleRate", 44100 ),
|
||||||
m_sInputDrivers ( "InputDrivers", "" ),
|
m_sInputDrivers ( "InputDrivers", "" ),
|
||||||
m_sMovieDrivers ( "MovieDrivers", "" ),
|
|
||||||
m_sLightsStepsDifficulty ( "LightsStepsDifficulty", "medium" ),
|
m_sLightsStepsDifficulty ( "LightsStepsDifficulty", "medium" ),
|
||||||
m_bBlinkGameplayButtonLightsOnNote ( "BlinkGameplayButtonLightsOnNote",false ),
|
m_bBlinkGameplayButtonLightsOnNote ( "BlinkGameplayButtonLightsOnNote",false ),
|
||||||
m_bAllowUnacceleratedRenderer ( "AllowUnacceleratedRenderer", false ),
|
m_bAllowUnacceleratedRenderer ( "AllowUnacceleratedRenderer", false ),
|
||||||
@@ -522,14 +521,6 @@ CString PrefsManager::GetInputDrivers() {
|
|||||||
return m_sInputDrivers;
|
return m_sInputDrivers;
|
||||||
}
|
}
|
||||||
|
|
||||||
CString PrefsManager::GetMovieDrivers()
|
|
||||||
{
|
|
||||||
if ( m_sMovieDrivers.Get().empty() )
|
|
||||||
return (CString)DEFAULT_MOVIE_DRIVER_LIST;
|
|
||||||
else
|
|
||||||
return m_sMovieDrivers;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool PrefsManager::MessageIsIgnored( const CString &ID )
|
bool PrefsManager::MessageIsIgnored( const CString &ID )
|
||||||
{
|
{
|
||||||
vector<CString> list;
|
vector<CString> list;
|
||||||
|
|||||||
@@ -227,7 +227,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
Preference<CString> m_sInputDrivers; // "" == default
|
Preference<CString> m_sInputDrivers; // "" == default
|
||||||
public:
|
public:
|
||||||
Preference<CString> m_sMovieDrivers; // "" == default
|
|
||||||
Preference<CString> m_sLightsStepsDifficulty;
|
Preference<CString> m_sLightsStepsDifficulty;
|
||||||
Preference<bool> m_bBlinkGameplayButtonLightsOnNote;
|
Preference<bool> m_bBlinkGameplayButtonLightsOnNote;
|
||||||
Preference<bool> m_bAllowUnacceleratedRenderer;
|
Preference<bool> m_bAllowUnacceleratedRenderer;
|
||||||
@@ -258,7 +257,6 @@ public:
|
|||||||
CString GetSoundDrivers();
|
CString GetSoundDrivers();
|
||||||
float GetSoundVolume();
|
float GetSoundVolume();
|
||||||
CString GetInputDrivers();
|
CString GetInputDrivers();
|
||||||
CString GetMovieDrivers();
|
|
||||||
|
|
||||||
|
|
||||||
void ReadPrefsFromIni( const IniFile &ini, const CString &sSection );
|
void ReadPrefsFromIni( const IniFile &ini, const CString &sSection );
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#include "arch_platform.h"
|
#include "arch_platform.h"
|
||||||
#include "Foreach.h"
|
#include "Foreach.h"
|
||||||
#include "LocalizedString.h"
|
#include "LocalizedString.h"
|
||||||
|
#include "arch/arch_default.h"
|
||||||
|
|
||||||
#include "InputHandler/Selector_InputHandler.h"
|
#include "InputHandler/Selector_InputHandler.h"
|
||||||
static LocalizedString INPUT_HANDLERS_EMPTY( "Arch", "Input Handlers cannot be empty." );
|
static LocalizedString INPUT_HANDLERS_EMPTY( "Arch", "Input Handlers cannot be empty." );
|
||||||
@@ -176,6 +177,7 @@ MemoryCardDriver *MakeMemoryCardDriver()
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Preference<CString> g_sMovieDrivers( "MovieDrivers", "" ); // "" == default
|
||||||
#include "MovieTexture/Selector_MovieTexture.h"
|
#include "MovieTexture/Selector_MovieTexture.h"
|
||||||
static void DumpAVIDebugInfo( const CString& fn );
|
static void DumpAVIDebugInfo( const CString& fn );
|
||||||
/* Try drivers in order of preference until we find one that works. */
|
/* Try drivers in order of preference until we find one that works. */
|
||||||
@@ -185,8 +187,12 @@ RageMovieTexture *MakeRageMovieTexture( RageTextureID ID )
|
|||||||
{
|
{
|
||||||
DumpAVIDebugInfo( ID.filename );
|
DumpAVIDebugInfo( ID.filename );
|
||||||
|
|
||||||
|
RString sDrivers = g_sMovieDrivers;
|
||||||
|
if( sDrivers.empty() )
|
||||||
|
sDrivers = DEFAULT_MOVIE_DRIVER_LIST;
|
||||||
|
|
||||||
vector<CString> DriversToTry;
|
vector<CString> DriversToTry;
|
||||||
split( PREFSMAN->GetMovieDrivers(), ",", DriversToTry, true );
|
split( sDrivers, ",", DriversToTry, true );
|
||||||
|
|
||||||
if( DriversToTry.empty() )
|
if( DriversToTry.empty() )
|
||||||
RageException::Throw( MOVIE_DRIVERS_EMPTY.GetValue() );
|
RageException::Throw( MOVIE_DRIVERS_EMPTY.GetValue() );
|
||||||
|
|||||||
Reference in New Issue
Block a user