move some prefs out of PrefsMan

This commit is contained in:
Glenn Maynard
2005-12-19 00:18:33 +00:00
parent 7c3d52ee00
commit c4c66841ec
3 changed files with 7 additions and 8 deletions
+7 -4
View File
@@ -12,6 +12,9 @@
#include "Style.h"
#include "SpecialFiles.h"
static Preference<CString> g_sLastSeenInputDevices( "LastSeenInputDevices", "" );
static Preference<bool> g_bAutoMapOnJoyChange( "AutoMapOnJoyChange", true );
InputMapper* INPUTMAPPER = NULL; // global and accessable from anywhere in our program
InputMapper::InputMapper()
@@ -522,11 +525,11 @@ bool InputMapper::CheckForChangedInputDevicesAndRemap( CString &sMessage )
INPUTMAN->GetDevicesAndDescriptions( vDevices, vsDescriptions );
CString sInputDevices = join( ",", vsDescriptions );
if( PREFSMAN->m_sLastSeenInputDevices.Get() == sInputDevices )
if( g_sLastSeenInputDevices.Get() == sInputDevices )
return false;
vector<CString> vsLastSeen;
split( PREFSMAN->m_sLastSeenInputDevices, ",", vsLastSeen );
split( g_sLastSeenInputDevices, ",", vsLastSeen );
vector<CString> vsConnects, vsDisconnects;
GetConnectsDisconnects( vsLastSeen, vsDescriptions, vsDisconnects, vsConnects );
@@ -537,7 +540,7 @@ bool InputMapper::CheckForChangedInputDevicesAndRemap( CString &sMessage )
if( !vsDisconnects.empty() )
sMessage += "Disconnected: " + join( "\n", vsDisconnects ) + "\n";
if( PREFSMAN->m_bAutoMapOnJoyChange )
if( g_bAutoMapOnJoyChange )
{
sMessage += "Remapping all joysticks.";
AutoMapJoysticksForCurrentGame();
@@ -546,7 +549,7 @@ bool InputMapper::CheckForChangedInputDevicesAndRemap( CString &sMessage )
LOG->Info( sMessage );
PREFSMAN->m_sLastSeenInputDevices.Set( sInputDevices );
g_sLastSeenInputDevices.Set( sInputDevices );
PREFSMAN->SavePrefsToDisk();
return true;
-2
View File
@@ -317,7 +317,6 @@ PrefsManager::PrefsManager() :
m_bLockCourseDifficulties ( "LockCourseDifficulties", true ),
m_ShowDancingCharacters ( "ShowDancingCharacters", SDC_Random ),
m_bUseUnlockSystem ( "UseUnlockSystem", false ),
m_bAutoMapOnJoyChange ( "AutoMapOnJoyChange", true ),
m_fGlobalOffsetSeconds ( "GlobalOffsetSeconds", 0 ),
m_iProgressiveLifebar ( "ProgressiveLifebar", 0 ),
m_iProgressiveStageLifebar ( "ProgressiveStageLifebar", 0 ),
@@ -361,7 +360,6 @@ PrefsManager::PrefsManager() :
m_sAdditionalSongFolders ( "AdditionalSongFolders", "" ),
m_sAdditionalFolders ( "AdditionalFolders", "" ),
m_sLastSeenVideoDriver ( "LastSeenVideoDriver", "" ),
m_sLastSeenInputDevices ( "LastSeenInputDevices", "" ),
#if defined(WIN32)
m_iLastSeenMemory ( "LastSeenMemory", 0 ),
#endif
-2
View File
@@ -160,7 +160,6 @@ public:
enum ShowDancingCharacters { SDC_Off = 0, SDC_Random = 1, SDC_Select = 2};
Preference<ShowDancingCharacters,int> m_ShowDancingCharacters;
Preference<bool> m_bUseUnlockSystem;
Preference<bool> m_bAutoMapOnJoyChange;
Preference<float> m_fGlobalOffsetSeconds;
Preference<int> m_iProgressiveLifebar;
Preference<int> m_iProgressiveStageLifebar;
@@ -229,7 +228,6 @@ public:
Preference<CString> m_sAdditionalFolders;
Preference<CString> m_sLastSeenVideoDriver;
Preference<CString> m_sLastSeenInputDevices;
#if defined(WIN32)
Preference<int> m_iLastSeenMemory;
#endif