ignore "checking" memory cards
This commit is contained in:
@@ -19,11 +19,29 @@ void ScreenOptionsMemoryCard::Init()
|
|||||||
this->SubscribeToMessage( Message_StorageDevicesChanged );
|
this->SubscribeToMessage( Message_StorageDevicesChanged );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ScreenOptionsMemoryCard::UpdateCurrentUsbStorageDevices()
|
||||||
|
{
|
||||||
|
vector<UsbStorageDevice> aOldDevices = m_CurrentUsbStorageDevices;
|
||||||
|
|
||||||
|
const vector<UsbStorageDevice> &aNewDevices = MEMCARDMAN->GetStorageDevices();
|
||||||
|
|
||||||
|
m_CurrentUsbStorageDevices.clear();
|
||||||
|
for( size_t i = 0; i < aNewDevices.size(); ++i )
|
||||||
|
{
|
||||||
|
const UsbStorageDevice &dev = aNewDevices[i];
|
||||||
|
if( dev.m_State == UsbStorageDevice::STATE_CHECKING )
|
||||||
|
continue;
|
||||||
|
m_CurrentUsbStorageDevices.push_back( dev );
|
||||||
|
}
|
||||||
|
|
||||||
|
return aOldDevices != m_CurrentUsbStorageDevices;
|
||||||
|
}
|
||||||
|
|
||||||
void ScreenOptionsMemoryCard::BeginScreen()
|
void ScreenOptionsMemoryCard::BeginScreen()
|
||||||
{
|
{
|
||||||
vector<OptionRowHandler*> vHands;
|
vector<OptionRowHandler*> vHands;
|
||||||
|
|
||||||
m_CurrentUsbStorageDevices = MEMCARDMAN->GetStorageDevices();
|
UpdateCurrentUsbStorageDevices();
|
||||||
|
|
||||||
FOREACH_CONST( UsbStorageDevice, m_CurrentUsbStorageDevices, iter )
|
FOREACH_CONST( UsbStorageDevice, m_CurrentUsbStorageDevices, iter )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ private:
|
|||||||
|
|
||||||
void SelectRowWithMemoryCard( const RString &sOsMountPoint );
|
void SelectRowWithMemoryCard( const RString &sOsMountPoint );
|
||||||
|
|
||||||
|
bool UpdateCurrentUsbStorageDevices();
|
||||||
vector<UsbStorageDevice> m_CurrentUsbStorageDevices;
|
vector<UsbStorageDevice> m_CurrentUsbStorageDevices;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user