diff --git a/stepmania/Themes/default/metrics.ini b/stepmania/Themes/default/metrics.ini index c9aa7c8309..02deefd119 100644 --- a/stepmania/Themes/default/metrics.ini +++ b/stepmania/Themes/default/metrics.ini @@ -3097,7 +3097,6 @@ Line9=conf,ShowSongOptions Line10=conf,GetRankingName Line11=conf,AllowW1 - [ScreenGraphicOptions] Fallback=ScreenOptionsServiceChild LineNames=1,2,3,4,5,6,7,8,9,10,11,12,13,14 @@ -3613,7 +3612,7 @@ PrevScreen=@ScreenTitleBranch() # when using entries that change the screen; otherwise, the only way to # exit the screen when in regular mode is "exit". -ThemeItems=0 +ThemeItems=1 ThemeTitles=1 IconsOnCommand=x,-30 @@ -3623,7 +3622,7 @@ StyleIcon=0 TimerSeconds=0 AllowOperatorMenuButton=0 -LineNames=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16 +LineNames=1,2,3,4,5,6,7,8,9,10,12,13,14,15,16,17 OptionMenuFlags=together;forceallplayers;smnavigation # This NextScreen is only used for the "exit" choice. Line1=list,Appearance Options @@ -3636,12 +3635,12 @@ Line7=list,Input Options Line8=list,Gameplay Options Line9=list,Graphic Options Line10=list,Machine Options -Line11=list,Sound Options -Line12=list,Profiles -Line13=list,Other Options -Line14=list,Network Options -Line15=list,Reload Songs/Courses -Line16=list,Test Input +Line12=list,Sound Options +Line13=list,Profiles +Line14=list,Other Options +Line15=list,Network Options +Line16=list,Reload Songs/Courses +Line17=list,Test Input [ScreenOptionsServiceChild] Fallback=ScreenOptionsService diff --git a/stepmania/src/MemoryCardManager.cpp b/stepmania/src/MemoryCardManager.cpp index 6859df7d5d..6fa383ec70 100644 --- a/stepmania/src/MemoryCardManager.cpp +++ b/stepmania/src/MemoryCardManager.cpp @@ -49,6 +49,7 @@ Preference1D MemoryCardManager::m_iMemoryCardUsbBus( MemoryCardUsbBusInit, Preference1D MemoryCardManager::m_iMemoryCardUsbPort( MemoryCardUsbPortInit, NUM_PLAYERS ); Preference1D MemoryCardManager::m_iMemoryCardUsbLevel( MemoryCardUsbLevelInit, NUM_PLAYERS ); +Preference MemoryCardManager::m_sEditorMemoryCardOsMountPoint( "EditorMemoryCardOsMountPoint", "" ); const CString MEM_CARD_MOUNT_POINT[NUM_PLAYERS] = { diff --git a/stepmania/src/MemoryCardManager.h b/stepmania/src/MemoryCardManager.h index 810cc4171c..7c1d6963bb 100644 --- a/stepmania/src/MemoryCardManager.h +++ b/stepmania/src/MemoryCardManager.h @@ -46,6 +46,8 @@ public: static Preference1D m_iMemoryCardUsbPort; static Preference1D m_iMemoryCardUsbLevel; + static Preference m_sEditorMemoryCardOsMountPoint; + protected: void CheckStateChanges(); diff --git a/stepmania/src/ScreenOptionsMemoryCard.cpp b/stepmania/src/ScreenOptionsMemoryCard.cpp index 582e85b946..88a7b36ed4 100644 --- a/stepmania/src/ScreenOptionsMemoryCard.cpp +++ b/stepmania/src/ScreenOptionsMemoryCard.cpp @@ -3,6 +3,7 @@ #include "RageLog.h" #include "arch/MemoryCard/MemoryCardDriver.h" #include "MemoryCardManager.h" +#include "GameState.h" REGISTER_SCREEN_CLASS( ScreenOptionsMemoryCard ); @@ -35,6 +36,25 @@ void ScreenOptionsMemoryCard::Init() InitMenu( m_vDefs, vHands ); } +void ScreenOptionsMemoryCard::BeginScreen() +{ + ScreenOptions::BeginScreen(); + + // select the last chosen memory card (if present) + if( !MEMCARDMAN->m_sEditorMemoryCardOsMountPoint.Get().empty() ) + { + const vector v = MEMCARDMAN->GetStorageDevices(); + for( unsigned i=0; im_sEditorMemoryCardOsMountPoint.Get() ) + { + this->MoveRowAbsolute( PLAYER_1, i, false ); + break; + } + } + } +} + void ScreenOptionsMemoryCard::HandleScreenMessage( const ScreenMessage SM ) { if( SM == SM_GoToNextScreen ) @@ -52,32 +72,21 @@ void ScreenOptionsMemoryCard::MenuStart( const InputEventPlus &input ) void ScreenOptionsMemoryCard::ImportOptions( int iRow, const vector &vpns ) { - OptionRow &row = *m_pRows[iRow]; - if( row.GetRowType() == OptionRow::ROW_EXIT ) - return; - const vector v = MEMCARDMAN->GetStorageDevices(); - const UsbStorageDevice &dev = v[iRow]; -// row.SetOneSharedSelection( MEMCARDMAN->IsBlacklisted(dev) ? 1:0 ); + } void ScreenOptionsMemoryCard::ExportOptions( int iRow, const vector &vpns ) { -// if( iRow == 0 ) -// MEMCARDMAN->m_sMemoryCardOsMountPointBlacklist.Set( "" ); OptionRow &row = *m_pRows[iRow]; if( row.GetRowType() == OptionRow::ROW_EXIT ) return; - const vector v = MEMCARDMAN->GetStorageDevices(); - const UsbStorageDevice &dev = v[iRow]; - int iSel = row.GetOneSharedSelection(); - if( iSel == 1 ) + + PlayerNumber pn = GAMESTATE->m_MasterPlayerNumber; + if( m_iCurrentRow[pn] == iRow ) { -// CString s = MEMCARDMAN->m_sMemoryCardOsMountPointBlacklist; -// if( s.empty() ) -// s = dev.sOsMountDir; -// else -// s += ","+dev.sOsMountDir; -// MEMCARDMAN->m_sMemoryCardOsMountPointBlacklist.Set( s ); + const vector v = MEMCARDMAN->GetStorageDevices(); + const UsbStorageDevice &dev = v[iRow]; + MEMCARDMAN->m_sEditorMemoryCardOsMountPoint.Set( dev.sOsMountDir ); } } diff --git a/stepmania/src/ScreenOptionsMemoryCard.h b/stepmania/src/ScreenOptionsMemoryCard.h index 8de8f5d427..12a640395e 100644 --- a/stepmania/src/ScreenOptionsMemoryCard.h +++ b/stepmania/src/ScreenOptionsMemoryCard.h @@ -8,6 +8,7 @@ class ScreenOptionsMemoryCard : public ScreenOptions public: ScreenOptionsMemoryCard( CString sName ); virtual void Init(); + void BeginScreen(); virtual void HandleScreenMessage( const ScreenMessage SM );