Files
itgmania212121/stepmania/src/PrefsManager.cpp
T

418 lines
19 KiB
C++
Raw Normal View History

2003-02-16 04:01:45 +00:00
#include "global.h"
2002-02-28 19:40:40 +00:00
/*
-----------------------------------------------------------------------------
Class: PrefsManager
Desc: See Header.
Copyright (c) 2001-2003 by the person(s) listed below. All rights reserved.
2002-02-28 19:40:40 +00:00
Chris Danford
Chris Gomez
2002-02-28 19:40:40 +00:00
-----------------------------------------------------------------------------
*/
#include "PrefsManager.h"
#include "IniFile.h"
2002-07-23 01:41:40 +00:00
#include "GameState.h"
#include "RageDisplay.h"
#include "RageUtil.h"
2002-12-13 22:06:30 +00:00
#include "arch/arch.h" /* for default driver specs */
2003-09-25 01:37:56 +00:00
#include "RageSoundReader_Resample.h" /* for ResampleQuality */
2002-02-28 19:40:40 +00:00
2003-07-22 07:47:27 +00:00
#define STEPMANIA_INI_PATH BASE_PATH "Data" SLASH "StepMania.ini"
2002-02-28 19:40:40 +00:00
2002-05-27 08:23:27 +00:00
PrefsManager* PREFSMAN = NULL; // global and accessable from anywhere in our program
2002-02-28 19:40:40 +00:00
2003-01-11 04:03:21 +00:00
const float DEFAULT_SOUND_VOLUME = 0.50;
2002-02-28 19:40:40 +00:00
PrefsManager::PrefsManager()
{
2003-02-15 05:15:24 +00:00
#ifdef DEBUG
2002-08-17 06:44:04 +00:00
m_bWindowed = true;
#else
2002-05-28 20:01:22 +00:00
m_bWindowed = false;
2002-08-17 06:44:04 +00:00
#endif
m_iDisplayWidth = 640;
m_iDisplayHeight = 480;
m_iDisplayColorDepth = 16;
m_iTextureColorDepth = 16; // default to 16 for better preformance on slower cards
2003-07-09 02:28:56 +00:00
m_iMovieColorDepth = 16;
2003-01-11 20:15:00 +00:00
m_iMaxTextureResolution = 2048;
2002-11-12 09:23:50 +00:00
m_iRefreshRate = REFRESH_DEFAULT;
m_bOnlyDedicatedMenuButtons = false;
2003-02-15 05:15:24 +00:00
#ifdef DEBUG
m_bShowStats = true;
#else
m_bShowStats = false;
#endif
2002-07-11 19:02:26 +00:00
m_BackgroundMode = BGMODE_ANIMATIONS;
m_iNumBackgrounds = 8;
m_bShowDanger = true;
2002-07-11 19:02:26 +00:00
m_fBGBrightness = 0.8f;
m_bMenuTimer = true;
2002-05-27 08:23:27 +00:00
m_iNumArcadeStages = 3;
2003-04-19 19:05:25 +00:00
m_bEventMode = false;
2002-06-24 22:04:31 +00:00
m_bAutoPlay = false;
m_fJudgeWindowScale = 1.0f;
m_fJudgeWindowMarvelousSeconds = 0.0225f;
m_fJudgeWindowPerfectSeconds = 0.045f;
m_fJudgeWindowGreatSeconds = 0.090f;
m_fJudgeWindowGoodSeconds = 0.135f;
m_fJudgeWindowBooSeconds = 0.180f;
2003-05-31 21:34:07 +00:00
m_fJudgeWindowOKSeconds = 0.250f; // allow enough time to take foot off and put back on
m_fLifeDifficultyScale = 1.0f;
m_iMovieDecodeMS = 2;
2002-08-22 03:35:33 +00:00
m_bDelayedEscape = true;
m_bInstructions = true;
m_bShowDontDie = true;
m_bShowSelectGroup = true;
2003-05-20 04:41:47 +00:00
m_bShowNative = true;
m_bArcadeOptionsNavigation = false;
2003-04-18 23:55:20 +00:00
m_bSoloSingle = false;
m_bDelayedTextureDelete = true;
2003-05-20 04:42:12 +00:00
m_bDelayedScreenLoad = false;
2003-06-12 01:35:09 +00:00
m_bBannerCache = true;
m_MusicWheelUsesSections = ALWAYS;
2003-01-21 06:51:35 +00:00
m_iMusicWheelSwitchSpeed = 10;
m_bEasterEggs = true;
m_iMarvelousTiming = 2;
m_iCoinMode = COIN_HOME;
2003-01-19 04:44:22 +00:00
m_iCoinsPerCredit = 1;
m_bJointPremium = false;
2003-01-18 04:26:25 +00:00
m_iBoostAppPriority = -1;
2003-06-05 19:29:27 +00:00
m_bAntiAliasing = false;
2003-04-21 22:36:45 +00:00
m_ShowSongOptions = YES;
m_bDancePointsForOni = false;
2003-03-07 04:47:04 +00:00
m_bTimestamping = false;
m_bShowLyrics = true;
m_bAutogenMissingTypes = true;
m_bAutogenGroupCourses = true;
m_bBreakComboToGetItem = false;
m_ShowDancingCharacters = CO_OFF;
m_bUseUnlockSystem = false;
m_bFirstRun = true;
m_bAutoMapOnJoyChange = true;
m_fGlobalOffsetSeconds = 0;
m_bForceLogFlush = false;
m_bLogging = true;
2003-08-20 09:17:56 +00:00
m_bShowBeginnerHelper = false;
2003-09-29 12:32:12 +00:00
m_bEndlessBreakEnabled = true;
m_iEndlessNumStagesUntilBreak = 5;
m_iEndlessBreakLength = 5;
#ifdef DEBUG
m_bShowLogWindow = true;
#else
m_bShowLogWindow = false;
#endif
m_bTenFooterInRed = true;
2003-08-20 17:54:26 +00:00
2003-07-29 12:42:38 +00:00
// set to 0 so people aren't shocked at first
m_iProgressiveLifebar = 0;
m_iProgressiveNonstopLifebar = 0;
2003-07-31 15:07:48 +00:00
m_iProgressiveStageLifebar = 0;
/* DDR Extreme-style extra stage support.
* Default off so people used to the current behavior (or those with extra
* stage CRS files) don't get it changed around on them. */
m_bPickExtraStage = false;
m_bComboContinuesBetweenSongs = false;
// default to old sort order
m_iCourseSortOrder = COURSE_SORT_SONGS;
m_bMoveRandomToEnd = false;
m_iScoringType = SCORING_MAX2;
m_fLongVerSongSeconds = 60*2.5f; // Dynamite Rave is 2:55
m_fMarathonVerSongSeconds = 60*5.f;
2002-08-30 04:28:12 +00:00
/* I'd rather get occasional people asking for support for this even though it's
* already here than lots of people asking why songs aren't being displayed. */
m_bHiddenSongs = false;
2002-09-03 00:22:19 +00:00
m_bVsync = true;
2003-08-19 08:01:15 +00:00
m_sLanguage = ""; // ThemeManager will deal with this invalid language
/* XXX: Set these defaults for individual consoles using VideoCardDefaults.ini. */
#ifdef _XBOX
m_bInterlaced = true;
m_bPAL = false;
#else
m_bInterlaced = false;
#endif
m_sSoundDrivers = DEFAULT_SOUND_DRIVER_LIST;
2003-09-02 04:51:36 +00:00
m_sMovieDrivers = DEFAULT_MOVIE_DRIVER_LIST;
2003-08-20 17:54:26 +00:00
// StepMania.cpp sets these on first run:
m_sVideoRenderers = "";
#if defined(WIN32)
m_iLastSeenMemory = 0;
#endif
2003-01-11 04:03:21 +00:00
m_fSoundVolume = DEFAULT_SOUND_VOLUME;
/* This is experimental: let's see if preloading helps people's skipping.
* If it doesn't do anything useful, it'll be removed. */
m_bSoundPreloadAll = false;
2003-09-25 01:37:56 +00:00
m_iSoundResampleQuality = RageSoundReader_Resample::RESAMP_NORMAL;
2003-08-20 17:54:26 +00:00
m_bAllowUnacceleratedRenderer = false;
2003-07-13 20:21:04 +00:00
m_bThreadedInput = true;
2003-07-07 03:51:20 +00:00
m_sIgnoredMessageWindows = "";
2003-08-20 17:54:26 +00:00
m_sCoursesToShowRanking = "";
2002-07-23 01:41:40 +00:00
ReadGlobalPrefsFromDisk( true );
2002-02-28 19:40:40 +00:00
}
PrefsManager::~PrefsManager()
{
}
void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
2002-02-28 19:40:40 +00:00
{
IniFile ini;
2003-07-22 07:47:27 +00:00
ini.SetPath( STEPMANIA_INI_PATH );
2002-05-27 08:23:27 +00:00
if( !ini.ReadFile() )
2002-05-20 08:59:37 +00:00
return; // could not read config file, load nothing
2002-02-28 19:40:40 +00:00
2003-10-02 02:03:29 +00:00
ini.GetValue( "Options", "Windowed", m_bWindowed );
ini.GetValue( "Options", "Interlaced", m_bInterlaced );
#ifdef _XBOX
2003-10-02 02:11:47 +00:00
ini.GetValue( "Options", "PAL", m_bPAL );
#endif
2003-10-02 02:03:29 +00:00
ini.GetValue( "Options", "DisplayWidth", m_iDisplayWidth );
ini.GetValue( "Options", "DisplayHeight", m_iDisplayHeight );
ini.GetValue( "Options", "DisplayColorDepth", m_iDisplayColorDepth );
ini.GetValue( "Options", "TextureColorDepth", m_iTextureColorDepth );
2003-10-02 02:11:47 +00:00
ini.GetValue( "Options", "MovieColorDepth", m_iMovieColorDepth );
2003-10-02 02:03:29 +00:00
ini.GetValue( "Options", "MaxTextureResolution", m_iMaxTextureResolution );
2003-10-02 02:11:47 +00:00
ini.GetValue( "Options", "RefreshRate", m_iRefreshRate );
ini.GetValue( "Options", "UseDedicatedMenuButtons", m_bOnlyDedicatedMenuButtons );
2003-10-02 02:03:29 +00:00
ini.GetValue( "Options", "ShowStats", m_bShowStats );
ini.GetValue( "Options", "BackgroundMode", (int&)m_BackgroundMode );
ini.GetValue( "Options", "NumBackgrounds", m_iNumBackgrounds);
ini.GetValue( "Options", "ShowDanger", m_bShowDanger );
ini.GetValue( "Options", "BGBrightness", m_fBGBrightness );
ini.GetValue( "Options", "MenuTimer", m_bMenuTimer );
2003-10-02 02:11:47 +00:00
ini.GetValue( "Options", "NumArcadeStages", m_iNumArcadeStages );
2003-10-02 02:03:29 +00:00
ini.GetValue( "Options", "EventMode", m_bEventMode );
ini.GetValue( "Options", "AutoPlay", m_bAutoPlay );
ini.GetValue( "Options", "JudgeWindowScale", m_fJudgeWindowScale );
2003-10-02 02:11:47 +00:00
ini.GetValue( "Options", "JudgeWindowMarvelousSeconds", m_fJudgeWindowMarvelousSeconds );
2003-10-02 02:03:29 +00:00
ini.GetValue( "Options", "JudgeWindowPerfectSeconds", m_fJudgeWindowPerfectSeconds );
2003-10-02 02:11:47 +00:00
ini.GetValue( "Options", "JudgeWindowGreatSeconds", m_fJudgeWindowGreatSeconds );
2003-10-02 02:03:29 +00:00
ini.GetValue( "Options", "JudgeWindowGoodSeconds", m_fJudgeWindowGoodSeconds );
ini.GetValue( "Options", "JudgeWindowBooSeconds", m_fJudgeWindowBooSeconds );
ini.GetValue( "Options", "JudgeWindowOKSeconds", m_fJudgeWindowOKSeconds );
2003-10-02 02:11:47 +00:00
ini.GetValue( "Options", "LifeDifficultyScale", m_fLifeDifficultyScale );
2003-10-02 02:03:29 +00:00
ini.GetValue( "Options", "MovieDecodeMS", m_iMovieDecodeMS );
ini.GetValue( "Options", "DelayedEscape", m_bDelayedEscape );
2003-10-02 02:11:47 +00:00
ini.GetValue( "Options", "HiddenSongs", m_bHiddenSongs );
2003-10-02 02:03:29 +00:00
ini.GetValue( "Options", "Vsync", m_bVsync );
ini.GetValue( "Options", "HowToPlay", m_bInstructions );
2003-10-02 02:11:47 +00:00
ini.GetValue( "Options", "Caution", m_bShowDontDie );
ini.GetValue( "Options", "ShowSelectGroup", m_bShowSelectGroup );
2003-10-02 02:03:29 +00:00
ini.GetValue( "Options", "ShowNative", m_bShowNative );
2003-10-02 02:11:47 +00:00
ini.GetValue( "Options", "ArcadeOptionsNavigation", m_bArcadeOptionsNavigation );
ini.GetValue( "Options", "DWIPath", m_DWIPath );
2003-10-02 02:03:29 +00:00
ini.GetValue( "Options", "DelayedTextureDelete", m_bDelayedTextureDelete );
ini.GetValue( "Options", "DelayedScreenLoad", m_bDelayedScreenLoad );
2003-10-02 02:11:47 +00:00
ini.GetValue( "Options", "BannerCache", m_bBannerCache );
2003-10-02 02:03:29 +00:00
ini.GetValue( "Options", "MusicWheelUsesSections", (int&)m_MusicWheelUsesSections );
ini.GetValue( "Options", "MusicWheelSwitchSpeed", m_iMusicWheelSwitchSpeed );
ini.GetValue( "Options", "SoundDrivers", m_sSoundDrivers );
ini.GetValue( "Options", "MovieDrivers", m_sMovieDrivers );
ini.GetValue( "Options", "EasterEggs", m_bEasterEggs );
2003-10-02 02:11:47 +00:00
ini.GetValue( "Options", "MarvelousTiming", (int&)m_iMarvelousTiming );
ini.GetValue( "Options", "SoundVolume", m_fSoundVolume );
ini.GetValue( "Options", "SoundPreloadAll", m_bSoundPreloadAll );
2003-10-02 02:03:29 +00:00
ini.GetValue( "Options", "SoundResampleQuality", m_iSoundResampleQuality );
ini.GetValue( "Options", "CoinMode", m_iCoinMode );
ini.GetValue( "Options", "CoinsPerCredit", m_iCoinsPerCredit );
ini.GetValue( "Options", "JointPremium", m_bJointPremium );
ini.GetValue( "Options", "BoostAppPriority", m_iBoostAppPriority );
ini.GetValue( "Options", "PickExtraStage", m_bPickExtraStage );
ini.GetValue( "Options", "ComboContinuesBetweenSongs", m_bComboContinuesBetweenSongs );
ini.GetValue( "Options", "LongVerSeconds", m_fLongVerSongSeconds );
ini.GetValue( "Options", "MarathonVerSeconds", m_fMarathonVerSongSeconds );
2003-10-02 02:11:47 +00:00
ini.GetValue( "Options", "ShowSongOptions", (int&)m_ShowSongOptions );
2003-10-02 02:03:29 +00:00
ini.GetValue( "Options", "AllowUnacceleratedRenderer", m_bAllowUnacceleratedRenderer );
ini.GetValue( "Options", "ThreadedInput", m_bThreadedInput );
ini.GetValue( "Options", "IgnoredMessageWindows", m_sIgnoredMessageWindows );
ini.GetValue( "Options", "SoloSingle", m_bSoloSingle );
ini.GetValue( "Options", "DancePointsForOni", m_bDancePointsForOni );
ini.GetValue( "Options", "ShowLyrics", m_bShowLyrics );
2003-10-02 02:11:47 +00:00
ini.GetValue( "Options", "AutogenMissingTypes", m_bAutogenMissingTypes );
ini.GetValue( "Options", "AutogenGroupCourses", m_bAutogenGroupCourses );
2003-10-02 02:03:29 +00:00
ini.GetValue( "Options", "Timestamping", m_bTimestamping );
2003-10-02 02:11:47 +00:00
ini.GetValue( "Options", "BreakComboToGetItem", m_bBreakComboToGetItem );
2003-10-02 02:03:29 +00:00
ini.GetValue( "Options", "ShowDancingCharacters", (int&)m_ShowDancingCharacters );
ini.GetValue( "Options", "TenFooterInRed", m_bTenFooterInRed );
2003-10-02 02:11:47 +00:00
ini.GetValue( "Options", "CourseSortOrder", (int&)m_iCourseSortOrder );
ini.GetValue( "Options", "MoveRandomToEnd", m_bMoveRandomToEnd );
2003-10-02 02:03:29 +00:00
2003-10-02 02:11:47 +00:00
ini.GetValue( "Options", "ScoringType", (int&)m_iScoringType );
2003-10-02 02:03:29 +00:00
ini.GetValue( "Options", "ProgressiveLifebar", m_iProgressiveLifebar );
ini.GetValue( "Options", "ProgressiveNonstopLifebar", m_iProgressiveNonstopLifebar );
2003-10-02 02:11:47 +00:00
ini.GetValue( "Options", "ProgressiveStageLifebar", m_iProgressiveStageLifebar );
2003-10-02 02:03:29 +00:00
2003-10-02 02:11:47 +00:00
ini.GetValue( "Options", "UseUnlockSystem", m_bUseUnlockSystem );
2003-10-02 02:03:29 +00:00
ini.GetValue( "Options", "FirstRun", m_bFirstRun );
ini.GetValue( "Options", "AutoMapJoysticks", m_bAutoMapOnJoyChange );
2003-10-02 02:03:29 +00:00
ini.GetValue( "Options", "VideoRenderers", m_sVideoRenderers );
2003-10-02 02:11:47 +00:00
ini.GetValue( "Options", "LastSeenVideoDriver", m_sLastSeenVideoDriver );
ini.GetValue( "Options", "LastSeenInputDevices", m_sLastSeenInputDevices );
#if defined(WIN32)
2003-10-02 02:03:29 +00:00
ini.GetValue( "Options", "LastSeenMemory", m_iLastSeenMemory );
#endif
2003-10-02 02:03:29 +00:00
ini.GetValue( "Options", "CoursesToShowRanking", m_sCoursesToShowRanking );
ini.GetValue( "Options", "AntiAliasing", m_bAntiAliasing );
2003-10-02 02:11:47 +00:00
ini.GetValue( "Options", "GlobalOffsetSeconds", m_fGlobalOffsetSeconds );
2003-10-02 02:03:29 +00:00
ini.GetValue( "Options", "ForceLogFlush", m_bForceLogFlush );
2003-10-02 02:11:47 +00:00
ini.GetValue( "Options", "Logging", m_bLogging );
2003-10-02 02:03:29 +00:00
ini.GetValue( "Options", "ShowLogWindow", m_bShowLogWindow );
ini.GetValue( "Options", "ShowBeginnerHelper", m_bShowBeginnerHelper );
ini.GetValue( "Options", "Language", m_sLanguage );
2003-10-02 02:11:47 +00:00
ini.GetValue( "Options", "EndlessBreakEnabled", m_bEndlessBreakEnabled );
ini.GetValue( "Options", "EndlessStagesUntilBreak", m_iEndlessNumStagesUntilBreak );
2003-10-02 02:03:29 +00:00
ini.GetValue( "Options", "EndlessBreakLength", m_iEndlessBreakLength );
for( int p=0; p<NUM_PLAYERS; p++ )
2003-10-02 02:03:29 +00:00
ini.GetValue( "Options", ssprintf("DefaultProfileP%d",p+1), m_sDefaultProfile[p] );
2003-07-18 08:04:47 +00:00
2002-10-24 20:15:24 +00:00
m_asAdditionalSongFolders.clear();
2002-06-27 17:49:10 +00:00
CString sAdditionalSongFolders;
ini.GetValue( "Options", "AdditionalSongFolders", sAdditionalSongFolders );
split( sAdditionalSongFolders, ",", m_asAdditionalSongFolders, true );
2002-02-28 19:40:40 +00:00
}
2002-07-23 01:41:40 +00:00
void PrefsManager::SaveGlobalPrefsToDisk()
2002-02-28 19:40:40 +00:00
{
IniFile ini;
2003-07-22 07:47:27 +00:00
ini.SetPath( STEPMANIA_INI_PATH );
2002-04-28 20:42:32 +00:00
2003-10-02 02:11:47 +00:00
ini.SetValue( "Options", "Windowed", m_bWindowed );
ini.SetValue( "Options", "DisplayWidth", m_iDisplayWidth );
ini.SetValue( "Options", "DisplayHeight", m_iDisplayHeight );
ini.SetValue( "Options", "DisplayColorDepth", m_iDisplayColorDepth );
ini.SetValue( "Options", "TextureColorDepth", m_iTextureColorDepth );
ini.SetValue( "Options", "MovieColorDepth", m_iMovieColorDepth );
ini.SetValue( "Options", "MaxTextureResolution", m_iMaxTextureResolution );
ini.SetValue( "Options", "RefreshRate", m_iRefreshRate );
ini.SetValue( "Options", "UseDedicatedMenuButtons", m_bOnlyDedicatedMenuButtons );
ini.SetValue( "Options", "ShowStats", m_bShowStats );
ini.SetValue( "Options", "BackgroundMode", m_BackgroundMode);
ini.SetValue( "Options", "NumBackgrounds", m_iNumBackgrounds);
ini.SetValue( "Options", "ShowDanger", m_bShowDanger );
ini.SetValue( "Options", "BGBrightness", m_fBGBrightness );
ini.SetValue( "Options", "MenuTimer", m_bMenuTimer );
ini.SetValue( "Options", "NumArcadeStages", m_iNumArcadeStages );
ini.SetValue( "Options", "EventMode", m_bEventMode );
ini.SetValue( "Options", "AutoPlay", m_bAutoPlay );
ini.SetValue( "Options", "JudgeWindowScale", m_fJudgeWindowScale );
ini.SetValue( "Options", "JudgeWindowMarvelousSeconds", m_fJudgeWindowMarvelousSeconds );
ini.SetValue( "Options", "JudgeWindowPerfectSeconds", m_fJudgeWindowPerfectSeconds );
ini.SetValue( "Options", "JudgeWindowGreatSeconds", m_fJudgeWindowGreatSeconds );
ini.SetValue( "Options", "JudgeWindowGoodSeconds", m_fJudgeWindowGoodSeconds );
ini.SetValue( "Options", "JudgeWindowBooSeconds", m_fJudgeWindowBooSeconds );
ini.SetValue( "Options", "JudgeWindowOKSeconds", m_fJudgeWindowOKSeconds );
ini.SetValue( "Options", "LifeDifficultyScale", m_fLifeDifficultyScale );
ini.SetValue( "Options", "MovieDecodeMS", m_iMovieDecodeMS );
ini.SetValue( "Options", "DelayedEscape", m_bDelayedEscape );
ini.SetValue( "Options", "HiddenSongs", m_bHiddenSongs );
ini.SetValue( "Options", "Vsync", m_bVsync );
ini.SetValue( "Options", "Interlaced", m_bInterlaced );
#ifdef _XBOX
2003-10-02 02:11:47 +00:00
ini.SetValue( "Options", "PAL", m_bPAL );
#endif
2003-10-02 02:11:47 +00:00
ini.SetValue( "Options", "HowToPlay", m_bInstructions );
ini.SetValue( "Options", "Caution", m_bShowDontDie );
ini.SetValue( "Options", "ShowSelectGroup", m_bShowSelectGroup );
ini.SetValue( "Options", "ShowNative", m_bShowNative );
ini.SetValue( "Options", "ArcadeOptionsNavigation", m_bArcadeOptionsNavigation );
ini.SetValue ( "Options", "DWIPath", m_DWIPath );
2003-10-02 02:11:47 +00:00
ini.SetValue( "Options", "DelayedTextureDelete", m_bDelayedTextureDelete );
ini.SetValue( "Options", "DelayedScreenLoad", m_bDelayedScreenLoad );
ini.SetValue( "Options", "BannerCache", m_bBannerCache );
ini.SetValue( "Options", "MusicWheelUsesSections", m_MusicWheelUsesSections );
ini.SetValue( "Options", "MusicWheelSwitchSpeed", m_iMusicWheelSwitchSpeed );
ini.SetValue( "Options", "EasterEggs", m_bEasterEggs );
ini.SetValue( "Options", "MarvelousTiming", m_iMarvelousTiming );
ini.SetValue( "Options", "SoundPreloadAll", m_bSoundPreloadAll );
ini.SetValue( "Options", "SoundResampleQuality", m_iSoundResampleQuality );
ini.SetValue( "Options", "CoinMode", m_iCoinMode );
ini.SetValue( "Options", "CoinsPerCredit", m_iCoinsPerCredit );
ini.SetValue( "Options", "JointPremium", m_bJointPremium );
ini.SetValue( "Options", "BoostAppPriority", m_iBoostAppPriority );
ini.SetValue( "Options", "PickExtraStage", m_bPickExtraStage );
ini.SetValue( "Options", "ComboContinuesBetweenSongs", m_bComboContinuesBetweenSongs );
ini.SetValue( "Options", "LongVerSeconds", m_fLongVerSongSeconds );
ini.SetValue( "Options", "MarathonVerSeconds", m_fMarathonVerSongSeconds );
ini.SetValue( "Options", "ShowSongOptions", m_ShowSongOptions );
ini.SetValue( "Options", "AllowUnacceleratedRenderer", m_bAllowUnacceleratedRenderer );
ini.SetValue( "Options", "ThreadedInput", m_bThreadedInput );
ini.SetValue( "Options", "IgnoredMessageWindows", m_sIgnoredMessageWindows );
ini.SetValue( "Options", "SoloSingle", m_bSoloSingle );
ini.SetValue( "Options", "DancePointsForOni", m_bDancePointsForOni );
ini.SetValue( "Options", "ShowLyrics", m_bShowLyrics );
ini.SetValue( "Options", "AutogenMissingTypes", m_bAutogenMissingTypes );
ini.SetValue( "Options", "AutogenGroupCourses", m_bAutogenGroupCourses );
ini.SetValue( "Options", "Timestamping", m_bTimestamping );
ini.SetValue( "Options", "BreakComboToGetItem", m_bBreakComboToGetItem );
ini.SetValue( "Options", "ShowDancingCharacters", m_ShowDancingCharacters );
ini.SetValue( "Options", "UseUnlockSystem", m_bUseUnlockSystem );
ini.SetValue( "Options", "FirstRun", m_bFirstRun );
ini.SetValue( "Options", "AutoMapJoysticks", m_bAutoMapOnJoyChange );
ini.SetValue ( "Options", "VideoRenderers", m_sVideoRenderers );
ini.SetValue ( "Options", "LastSeenVideoDriver", m_sLastSeenVideoDriver );
ini.SetValue ( "Options", "LastSeenInputDevices", m_sLastSeenInputDevices );
#if defined(WIN32)
ini.SetValue ( "Options", "LastSeenMemory", m_iLastSeenMemory );
#endif
ini.SetValue ( "Options", "CoursesToShowRanking", m_sCoursesToShowRanking );
2003-10-02 02:11:47 +00:00
ini.SetValue( "Options", "AntiAliasing", m_bAntiAliasing );
ini.SetValue( "Options", "GlobalOffsetSeconds", m_fGlobalOffsetSeconds );
ini.SetValue( "Options", "ForceLogFlush", m_bForceLogFlush );
ini.SetValue( "Options", "Logging", m_bLogging );
ini.SetValue( "Options", "ShowLogWindow", m_bShowLogWindow );
ini.SetValue( "Options", "TenFooterInRed", m_bTenFooterInRed );
ini.SetValue( "Options", "CourseSortOrder", m_iCourseSortOrder );
ini.SetValue( "Options", "MoveRandomToEnd", m_bMoveRandomToEnd );
ini.SetValue( "Options", "ScoringType", m_iScoringType );
ini.SetValue( "Options", "ProgressiveLifebar", m_iProgressiveLifebar );
ini.SetValue( "Options", "ProgressiveStageLifebar", m_iProgressiveStageLifebar );
ini.SetValue( "Options", "ProgressiveNonstopLifebar", m_iProgressiveNonstopLifebar );
ini.SetValue( "Options", "ShowBeginnerHelper", m_bShowBeginnerHelper );
ini.SetValue ( "Options", "Language", m_sLanguage );
2003-10-02 02:11:47 +00:00
ini.SetValue( "Options", "EndlessBreakEnabled", m_bEndlessBreakEnabled );
ini.SetValue( "Options", "EndlessStagesUntilBreak", m_iEndlessNumStagesUntilBreak );
ini.SetValue( "Options", "EndlessBreakLength", m_iEndlessBreakLength );
for( int p=0; p<NUM_PLAYERS; p++ )
ini.SetValue ( "Options", ssprintf("DefaultProfileP%d",p+1), m_sDefaultProfile[p] );
/* Only write these if they aren't the default. This ensures that we can change
* the default and have it take effect for everyone (except people who
* tweaked this value). */
if(m_sSoundDrivers != DEFAULT_SOUND_DRIVER_LIST)
ini.SetValue ( "Options", "SoundDrivers", m_sSoundDrivers );
2003-01-11 04:03:21 +00:00
if(m_fSoundVolume != DEFAULT_SOUND_VOLUME)
2003-10-02 02:11:47 +00:00
ini.SetValue( "Options", "SoundVolume", m_fSoundVolume );
2003-09-02 04:51:36 +00:00
if(m_sMovieDrivers != DEFAULT_MOVIE_DRIVER_LIST)
ini.SetValue ( "Options", "MovieDrivers", m_sMovieDrivers );
2003-09-02 04:51:36 +00:00
2003-01-11 04:03:21 +00:00
2002-02-28 19:40:40 +00:00
2003-10-02 02:11:47 +00:00
ini.SetValue ( "Options", "AdditionalSongFolders", join(",", m_asAdditionalSongFolders) );
2002-06-27 17:49:10 +00:00
2002-02-28 19:40:40 +00:00
ini.WriteFile();
}