move InputDrivers into RageInput

This commit is contained in:
Glenn Maynard
2005-12-31 02:20:03 +00:00
parent 45d3c944af
commit 757fdf0795
5 changed files with 10 additions and 15 deletions
-8
View File
@@ -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<CString> list;
-3
View File
@@ -224,8 +224,6 @@ public:
Preference<int> m_iSoundWriteAhead;
Preference<CString> m_iSoundDevice;
Preference<int> m_iSoundPreferredSampleRate;
private:
Preference<CString> m_sInputDrivers; // "" == default
public:
Preference<CString> m_sLightsStepsDifficulty;
Preference<bool> m_bBlinkGameplayButtonLightsOnNote;
@@ -256,7 +254,6 @@ public:
CString GetVideoRenderers();
CString GetSoundDrivers();
float GetSoundVolume();
CString GetInputDrivers();
void ReadPrefsFromIni( const IniFile &ini, const CString &sSection );
+8 -2
View File
@@ -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<CString> 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();
}
+1 -1
View File
@@ -11,7 +11,7 @@ class InputHandler;
class RageInput
{
public:
RageInput( CString sDriverList );
RageInput();
~RageInput();
void LoadDrivers();
+1 -1
View File
@@ -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;