move InputDrivers into RageInput
This commit is contained in:
@@ -298,7 +298,6 @@ PrefsManager::PrefsManager() :
|
|||||||
m_iSoundWriteAhead ( "SoundWriteAhead", 0 ),
|
m_iSoundWriteAhead ( "SoundWriteAhead", 0 ),
|
||||||
m_iSoundDevice ( "SoundDevice", "" ),
|
m_iSoundDevice ( "SoundDevice", "" ),
|
||||||
m_iSoundPreferredSampleRate ( "SoundPreferredSampleRate", 44100 ),
|
m_iSoundPreferredSampleRate ( "SoundPreferredSampleRate", 44100 ),
|
||||||
m_sInputDrivers ( "InputDrivers", "" ),
|
|
||||||
m_sLightsStepsDifficulty ( "LightsStepsDifficulty", "medium" ),
|
m_sLightsStepsDifficulty ( "LightsStepsDifficulty", "medium" ),
|
||||||
m_bBlinkGameplayButtonLightsOnNote ( "BlinkGameplayButtonLightsOnNote",false ),
|
m_bBlinkGameplayButtonLightsOnNote ( "BlinkGameplayButtonLightsOnNote",false ),
|
||||||
m_bAllowUnacceleratedRenderer ( "AllowUnacceleratedRenderer", false ),
|
m_bAllowUnacceleratedRenderer ( "AllowUnacceleratedRenderer", false ),
|
||||||
@@ -514,13 +513,6 @@ float PrefsManager::GetSoundVolume()
|
|||||||
return clamp(m_fSoundVolume.Get(),0.0f,1.0f);
|
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 )
|
bool PrefsManager::MessageIsIgnored( const CString &ID )
|
||||||
{
|
{
|
||||||
vector<CString> list;
|
vector<CString> list;
|
||||||
|
|||||||
@@ -224,8 +224,6 @@ public:
|
|||||||
Preference<int> m_iSoundWriteAhead;
|
Preference<int> m_iSoundWriteAhead;
|
||||||
Preference<CString> m_iSoundDevice;
|
Preference<CString> m_iSoundDevice;
|
||||||
Preference<int> m_iSoundPreferredSampleRate;
|
Preference<int> m_iSoundPreferredSampleRate;
|
||||||
private:
|
|
||||||
Preference<CString> m_sInputDrivers; // "" == default
|
|
||||||
public:
|
public:
|
||||||
Preference<CString> m_sLightsStepsDifficulty;
|
Preference<CString> m_sLightsStepsDifficulty;
|
||||||
Preference<bool> m_bBlinkGameplayButtonLightsOnNote;
|
Preference<bool> m_bBlinkGameplayButtonLightsOnNote;
|
||||||
@@ -256,7 +254,6 @@ public:
|
|||||||
CString GetVideoRenderers();
|
CString GetVideoRenderers();
|
||||||
CString GetSoundDrivers();
|
CString GetSoundDrivers();
|
||||||
float GetSoundVolume();
|
float GetSoundVolume();
|
||||||
CString GetInputDrivers();
|
|
||||||
|
|
||||||
|
|
||||||
void ReadPrefsFromIni( const IniFile &ini, const CString &sSection );
|
void ReadPrefsFromIni( const IniFile &ini, const CString &sSection );
|
||||||
|
|||||||
@@ -4,15 +4,21 @@
|
|||||||
#include "RageException.h"
|
#include "RageException.h"
|
||||||
#include "arch/InputHandler/InputHandler.h"
|
#include "arch/InputHandler/InputHandler.h"
|
||||||
#include "arch/arch.h"
|
#include "arch/arch.h"
|
||||||
|
#include "arch/arch_default.h"
|
||||||
#include "Foreach.h"
|
#include "Foreach.h"
|
||||||
|
#include "Preference.h"
|
||||||
|
|
||||||
RageInput* INPUTMAN = NULL; // globally accessable input device
|
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()" );
|
LOG->Trace( "RageInput::RageInput()" );
|
||||||
|
|
||||||
m_sDriverList = sDriverList;
|
m_sDriverList = g_sInputDrivers;
|
||||||
|
if( m_sDriverList.empty() )
|
||||||
|
m_sDriverList = DEFAULT_INPUT_DRIVER_LIST;
|
||||||
|
|
||||||
LoadDrivers();
|
LoadDrivers();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ class InputHandler;
|
|||||||
class RageInput
|
class RageInput
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RageInput( CString sDriverList );
|
RageInput();
|
||||||
~RageInput();
|
~RageInput();
|
||||||
|
|
||||||
void LoadDrivers();
|
void LoadDrivers();
|
||||||
|
|||||||
@@ -1065,7 +1065,7 @@ int main(int argc, char* argv[])
|
|||||||
|
|
||||||
/* This initializes objects that change the SDL event mask, and has other
|
/* 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. */
|
* 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!
|
// These things depend on the TextureManager, so do them after!
|
||||||
FONT = new FontManager;
|
FONT = new FontManager;
|
||||||
|
|||||||
Reference in New Issue
Block a user