diff --git a/stepmania/src/PrefsManager.cpp b/stepmania/src/PrefsManager.cpp index b5d9a1e0e2..11659e4d2c 100644 --- a/stepmania/src/PrefsManager.cpp +++ b/stepmania/src/PrefsManager.cpp @@ -298,7 +298,6 @@ PrefsManager::PrefsManager() : m_iSoundWriteAhead ( "SoundWriteAhead", 0 ), m_iSoundDevice ( "SoundDevice", "" ), m_iSoundPreferredSampleRate ( "SoundPreferredSampleRate", 44100 ), - m_sInputDrivers ( "InputDrivers", "" ), m_sLightsStepsDifficulty ( "LightsStepsDifficulty", "medium" ), m_bBlinkGameplayButtonLightsOnNote ( "BlinkGameplayButtonLightsOnNote",false ), m_bAllowUnacceleratedRenderer ( "AllowUnacceleratedRenderer", false ), @@ -514,13 +513,6 @@ float PrefsManager::GetSoundVolume() return clamp(m_fSoundVolume.Get(),0.0f,1.0f); } -CString PrefsManager::GetInputDrivers() { - if( m_sInputDrivers.Get().empty() ) - return (CString)DEFAULT_INPUT_DRIVER_LIST; - else - return m_sInputDrivers; -} - bool PrefsManager::MessageIsIgnored( const CString &ID ) { vector list; diff --git a/stepmania/src/PrefsManager.h b/stepmania/src/PrefsManager.h index 047c894b55..963563474c 100644 --- a/stepmania/src/PrefsManager.h +++ b/stepmania/src/PrefsManager.h @@ -224,8 +224,6 @@ public: Preference m_iSoundWriteAhead; Preference m_iSoundDevice; Preference m_iSoundPreferredSampleRate; -private: - Preference m_sInputDrivers; // "" == default public: Preference m_sLightsStepsDifficulty; Preference m_bBlinkGameplayButtonLightsOnNote; @@ -256,7 +254,6 @@ public: CString GetVideoRenderers(); CString GetSoundDrivers(); float GetSoundVolume(); - CString GetInputDrivers(); void ReadPrefsFromIni( const IniFile &ini, const CString &sSection ); diff --git a/stepmania/src/RageInput.cpp b/stepmania/src/RageInput.cpp index cfe323d351..66feb0cc5b 100644 --- a/stepmania/src/RageInput.cpp +++ b/stepmania/src/RageInput.cpp @@ -4,15 +4,21 @@ #include "RageException.h" #include "arch/InputHandler/InputHandler.h" #include "arch/arch.h" +#include "arch/arch_default.h" #include "Foreach.h" +#include "Preference.h" RageInput* INPUTMAN = NULL; // globally accessable input device -RageInput::RageInput( CString sDriverList ) +static Preference g_sInputDrivers( "InputDrivers", "" ); // "" == DEFAULT_INPUT_DRIVER_LIST + +RageInput::RageInput() { LOG->Trace( "RageInput::RageInput()" ); - m_sDriverList = sDriverList; + m_sDriverList = g_sInputDrivers; + if( m_sDriverList.empty() ) + m_sDriverList = DEFAULT_INPUT_DRIVER_LIST; LoadDrivers(); } diff --git a/stepmania/src/RageInput.h b/stepmania/src/RageInput.h index 0810e161db..42816ca966 100644 --- a/stepmania/src/RageInput.h +++ b/stepmania/src/RageInput.h @@ -11,7 +11,7 @@ class InputHandler; class RageInput { public: - RageInput( CString sDriverList ); + RageInput(); ~RageInput(); void LoadDrivers(); diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index b552a595c1..7c48555215 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -1065,7 +1065,7 @@ int main(int argc, char* argv[]) /* This initializes objects that change the SDL event mask, and has other * dependencies on the SDL video subsystem, so it must be initialized after DISPLAY. */ - INPUTMAN = new RageInput( PREFSMAN->GetInputDrivers() ); + INPUTMAN = new RageInput; // These things depend on the TextureManager, so do them after! FONT = new FontManager;