split SelectRowWithMemoryCard
This commit is contained in:
@@ -64,18 +64,7 @@ void ScreenOptionsMemoryCard::BeginScreen()
|
||||
ScreenOptions::BeginScreen();
|
||||
|
||||
// select the last chosen memory card (if present)
|
||||
if( !MEMCARDMAN->m_sEditorMemoryCardOsMountPoint.Get().empty() )
|
||||
{
|
||||
const vector<UsbStorageDevice> &v = m_CurrentUsbStorageDevices;
|
||||
for( unsigned i=0; i<v.size(); i++ )
|
||||
{
|
||||
if( v[i].sOsMountDir == MEMCARDMAN->m_sEditorMemoryCardOsMountPoint.Get() )
|
||||
{
|
||||
this->MoveRowAbsolute( PLAYER_1, i, false );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
SelectRowWithMemoryCard( MEMCARDMAN->m_sEditorMemoryCardOsMountPoint.Get() );
|
||||
}
|
||||
|
||||
void ScreenOptionsMemoryCard::HandleScreenMessage( const ScreenMessage SM )
|
||||
@@ -115,6 +104,22 @@ void ScreenOptionsMemoryCard::ExportOptions( int iRow, const vector<PlayerNumber
|
||||
}
|
||||
}
|
||||
|
||||
void ScreenOptionsMemoryCard::SelectRowWithMemoryCard( const RString &sOsMountPoint )
|
||||
{
|
||||
if( sOsMountPoint.empty() )
|
||||
return;
|
||||
|
||||
const vector<UsbStorageDevice> &v = m_CurrentUsbStorageDevices;
|
||||
for( unsigned i=0; i<v.size(); i++ )
|
||||
{
|
||||
if( v[i].sOsMountDir == sOsMountPoint )
|
||||
{
|
||||
this->MoveRowAbsolute( PLAYER_1, i, false );
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static LocalizedString ERROR_MOUNTING_CARD ("ScreenOptionsMemoryCard", "Error mounting card: %s" );
|
||||
void ScreenOptionsMemoryCard::ProcessMenuStart( const InputEventPlus &input )
|
||||
{
|
||||
|
||||
@@ -20,6 +20,8 @@ private:
|
||||
|
||||
void ProcessMenuStart( const InputEventPlus &input );
|
||||
|
||||
void SelectRowWithMemoryCard( const RString &sOsMountPoint );
|
||||
|
||||
vector<UsbStorageDevice> m_CurrentUsbStorageDevices;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user