diff --git a/stepmania/src/PrefsManager.cpp b/stepmania/src/PrefsManager.cpp index d8745d4dcc..be9c0d445f 100644 --- a/stepmania/src/PrefsManager.cpp +++ b/stepmania/src/PrefsManager.cpp @@ -53,6 +53,7 @@ PrefsManager::PrefsManager() /* 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; + m_bVsync = true; ReadGlobalPrefsFromDisk( true ); } @@ -90,6 +91,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame ) ini.GetValueB( "Options", "UseBGIfNoBanner", m_bUseBGIfNoBanner ); ini.GetValueB( "Options", "DelayedEscape", m_bDelayedEscape ); ini.GetValueB( "Options", "HiddenSongs", m_bHiddenSongs ); + ini.GetValueB( "Options", "Vsync", m_bVsync ); m_asAdditionalSongFolders.RemoveAll(); CString sAdditionalSongFolders; @@ -130,6 +132,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() ini.SetValueB( "Options", "UseBGIfNoBanner", m_bUseBGIfNoBanner ); ini.SetValueB( "Options", "DelayedEscape", m_bDelayedEscape ); ini.SetValueB( "Options", "HiddenSongs", m_bHiddenSongs ); + ini.SetValueB( "Options", "Vsync", m_bVsync ); ini.SetValue( "Options", "AdditionalSongFolders", join(",", m_asAdditionalSongFolders) ); diff --git a/stepmania/src/PrefsManager.h b/stepmania/src/PrefsManager.h index 06646a9873..aa4f8702ee 100644 --- a/stepmania/src/PrefsManager.h +++ b/stepmania/src/PrefsManager.h @@ -37,6 +37,7 @@ public: int m_iMovieDecodeMS; bool m_bUseBGIfNoBanner; bool m_bHiddenSongs; + bool m_bVsync; bool m_bIgnoreJoyAxes; bool m_bOnlyDedicatedMenuButtons; diff --git a/stepmania/src/ScreenGraphicOptions.cpp b/stepmania/src/ScreenGraphicOptions.cpp index b05185f7fc..f44bf2e0af 100644 --- a/stepmania/src/ScreenGraphicOptions.cpp +++ b/stepmania/src/ScreenGraphicOptions.cpp @@ -33,6 +33,7 @@ enum { GO_BGBRIGHTNESS, GO_MOVIEDECODEMS, GO_BGIFNOBANNER, + GO_VSYNC, NUM_GRAPHIC_OPTIONS_LINES }; OptionLineData g_GraphicOptionsLines[NUM_GRAPHIC_OPTIONS_LINES] = { @@ -45,6 +46,7 @@ OptionLineData g_GraphicOptionsLines[NUM_GRAPHIC_OPTIONS_LINES] = { { "BG Brightness", 11, {"0%","10%","20%","30%","40%","50%","60%","70%","80%","90%","100%"} }, { "Movie Decode", 4, {"1ms","2ms","3ms","4ms"} }, { "BG For Banner", 2, {"NO", "YES (slow)"} }, + { "Wait for Vsync", 2, {"NO", "YES"} }, }; static const int HorizRes[] = { @@ -171,6 +173,7 @@ void ScreenGraphicOptions::ImportOptions() m_iSelectedOption[0][GO_BGBRIGHTNESS] = roundf( PREFSMAN->m_fBGBrightness*10 ); m_iSelectedOption[0][GO_MOVIEDECODEMS] = PREFSMAN->m_iMovieDecodeMS-1; m_iSelectedOption[0][GO_BGIFNOBANNER] = PREFSMAN->m_bUseBGIfNoBanner ? 1:0; + m_iSelectedOption[0][GO_VSYNC] = PREFSMAN->m_bVsync ? 1:0; } void ScreenGraphicOptions::ExportOptions() { @@ -213,6 +216,7 @@ void ScreenGraphicOptions::ExportOptions() PREFSMAN->m_fBGBrightness = m_iSelectedOption[0][GO_BGBRIGHTNESS] / 10.0f; PREFSMAN->m_iMovieDecodeMS = m_iSelectedOption[0][GO_MOVIEDECODEMS]+1; PREFSMAN->m_bUseBGIfNoBanner = m_iSelectedOption[0][GO_BGIFNOBANNER] == 1; + PREFSMAN->m_bVsync = m_iSelectedOption[0][GO_VSYNC] == 1; } void ScreenGraphicOptions::GoToPrevState()