split SelectRowWithMemoryCard

This commit is contained in:
Glenn Maynard
2006-02-03 07:34:27 +00:00
parent a9a36815b2
commit 7c46de7604
2 changed files with 19 additions and 12 deletions
+17 -12
View File
@@ -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 )
{
+2
View File
@@ -20,6 +20,8 @@ private:
void ProcessMenuStart( const InputEventPlus &input );
void SelectRowWithMemoryCard( const RString &sOsMountPoint );
vector<UsbStorageDevice> m_CurrentUsbStorageDevices;
};