diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index 07377277bb..e8d588a1e4 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -3095,7 +3095,6 @@ RandomVanish= // with other song select. SaveScreenshot=MenuLeft-MenuRight-Start CancelAllPlayerOptions= -SavePlayerOptions= [GrooveRadar] Label1OffsetX=0 // stream diff --git a/stepmania/src/CodeDetector.cpp b/stepmania/src/CodeDetector.cpp index 1cb98d6366..3031cbc529 100644 --- a/stepmania/src/CodeDetector.cpp +++ b/stepmania/src/CodeDetector.cpp @@ -64,7 +64,6 @@ const CString g_sCodeNames[CodeDetector::NUM_CODES] = { "NextBannerGroup2", "SaveScreenshot", "CancelAllPlayerOptions", - "SavePlayerOptions", }; CodeItem g_CodeItems[CodeDetector::NUM_CODES]; diff --git a/stepmania/src/CodeDetector.h b/stepmania/src/CodeDetector.h index 051821f834..e5e73be36d 100644 --- a/stepmania/src/CodeDetector.h +++ b/stepmania/src/CodeDetector.h @@ -76,7 +76,6 @@ public: CODE_BW_NEXT_GROUP2, CODE_SAVE_SCREENSHOT, CODE_CANCEL_ALL_PLAYER_OPTIONS, - CODE_SAVE_PLAYER_OPTIONS, NUM_CODES // leave this at the end }; diff --git a/stepmania/src/ScreenPlayerOptions.cpp b/stepmania/src/ScreenPlayerOptions.cpp index ed782e049b..2e09c96a70 100644 --- a/stepmania/src/ScreenPlayerOptions.cpp +++ b/stepmania/src/ScreenPlayerOptions.cpp @@ -123,18 +123,6 @@ void ScreenPlayerOptions::Input( const DeviceInput& DeviceI, const InputEventTyp this->PositionUnderlines(); } - if( CodeDetector::EnteredCode(GameI.controller,CodeDetector::CODE_SAVE_PLAYER_OPTIONS) ) - { - if( PROFILEMAN->IsUsingProfile(pn) ) - { - SOUND->PlayOnce( THEME->GetPathToS("ScreenPlayerOptions save") ); - this->ExportOptions(); - Profile* pProfile = PROFILEMAN->GetProfile(pn); - pProfile->m_bUsingProfileDefaultModifiers = true; - pProfile->m_sDefaultModifiers = GAMESTATE->m_PlayerOptions[pn].GetString(); - } - } - ScreenOptionsMaster::Input( DeviceI, type, GameI, MenuI, StyleI ); // UGLY: Update m_Disqualified whenever Start is pressed @@ -171,6 +159,22 @@ void ScreenPlayerOptions::HandleScreenMessage( const ScreenMessage SM ) ScreenOptionsMaster::HandleScreenMessage( SM ); } +void ScreenPlayerOptions::ExportOptions() +{ + ScreenOptionsMaster::ExportOptions(); + + // automatically save all options to profile + FOREACH_HumanPlayer( pn ) + { + if( PROFILEMAN->IsUsingProfile(pn) ) + { + Profile* pProfile = PROFILEMAN->GetProfile(pn); + pProfile->m_bUsingProfileDefaultModifiers = true; + pProfile->m_sDefaultModifiers = GAMESTATE->m_PlayerOptions[pn].GetString(); + } + } +} + void ScreenPlayerOptions::UpdateDisqualified() { // save current player options @@ -183,7 +187,7 @@ void ScreenPlayerOptions::UpdateDisqualified() } // export the currently selection options, which will fill GAMESTATE->m_PlayerOptions - this->ExportOptions(); + ScreenOptionsMaster::ExportOptions(); { for( int p=0; p