Xbox: add virtual memory related preferences

This commit is contained in:
Ryan Dortmans
2004-11-08 02:37:34 +00:00
parent 4fb20257b8
commit 2d25453707
2 changed files with 35 additions and 0 deletions
+26
View File
@@ -324,6 +324,14 @@ void PrefsManager::Init()
m_sMemoryCardProfileSubdir = PRODUCT_NAME;
m_iProductID = 1;
#if defined(XBOX)
m_bEnableVirtualMemory = true;
m_iPageFileSize = 384;
m_iPageSize = 16;
m_iPageThreshold = 8;
m_bLogVirtualMemory = false;
#endif
FOREACH_CONST( IPreference*, *g_pvpSubscribers, p ) (*p)->LoadDefault();
}
@@ -581,6 +589,14 @@ void PrefsManager::ReadPrefsFromFile( CString sIni )
FixSlashesInPlace(m_sAdditionalSongFolders);
FixSlashesInPlace(m_sAdditionalFolders);
#if defined(XBOX)
ini.GetValue( "Options", "EnableVirtualMemory", m_bEnableVirtualMemory );
ini.GetValue( "Options", "PageFileSize", m_iPageFileSize );
ini.GetValue( "Options", "PageSize", m_iPageSize );
ini.GetValue( "Options", "PageThreshold", m_iPageThreshold );
ini.GetValue( "Debug", "LogVirtualMemory", m_bLogVirtualMemory );
#endif
ini.GetValue( "Debug", "LogToDisk", m_bLogToDisk );
ini.GetValue( "Debug", "ForceLogFlush", m_bForceLogFlush );
ini.GetValue( "Debug", "ShowLogOutput", m_bShowLogOutput );
@@ -834,6 +850,13 @@ void PrefsManager::SaveGlobalPrefsToDisk() const
ini.SetValue( "Options", "AdditionalSongFolders", m_sAdditionalSongFolders);
ini.SetValue( "Options", "AdditionalFolders", m_sAdditionalFolders);
#if defined(XBOX)
ini.SetValue( "Options", "EnableVirtualMemory", m_bEnableVirtualMemory );
ini.SetValue( "Options", "PageFileSize", m_iPageFileSize );
ini.SetValue( "Options", "PageSize", m_iPageSize );
ini.SetValue( "Options", "PageThreshold", m_iPageThreshold );
#endif
ini.SetValue( "Debug", "LogToDisk", m_bLogToDisk );
ini.SetValue( "Debug", "ForceLogFlush", m_bForceLogFlush );
ini.SetValue( "Debug", "ShowLogOutput", m_bShowLogOutput );
@@ -841,6 +864,9 @@ void PrefsManager::SaveGlobalPrefsToDisk() const
ini.SetValue( "Debug", "LogSkips", m_bLogSkips );
ini.SetValue( "Debug", "LogCheckpoints", m_bLogCheckpoints );
ini.SetValue( "Debug", "ShowLoadingWindow", m_bShowLoadingWindow );
#if defined(XBOX)
ini.SetValue( "Debug", "LogVirtualMemory", m_bLogVirtualMemory );
#endif
#if defined (WITHOUT_NETWORKING)
#else
+9
View File
@@ -278,6 +278,15 @@ public:
/* Game-specific prefs: */
CString m_sDefaultModifiers;
#if defined(XBOX)
// Virtual memory preferences
bool m_bEnableVirtualMemory;
int m_iPageFileSize; // page file size in megabytes
int m_iPageSize; // page size in kilobytes
int m_iPageThreshold; // threshold in kilobytes where virtual memory will be used
bool m_bLogVirtualMemory; // (under debug) log the virtual memory allocation, etc.
#endif
void ReadGlobalPrefsFromDisk();
void SaveGlobalPrefsToDisk() const;