FolderMemoryCard: Remember filter so it can be reapplied when memory cards are changed while game is running.

This commit is contained in:
Admiral H. Curtiss 2015-05-25 04:40:02 +02:00
parent 02ae12c555
commit b4b55289d6
2 changed files with 3 additions and 1 deletions

View File

@ -1025,7 +1025,7 @@ FolderMemoryCardAggregator::FolderMemoryCardAggregator() {
void FolderMemoryCardAggregator::Open() { void FolderMemoryCardAggregator::Open() {
for ( int i = 0; i < totalCardSlots; ++i ) { for ( int i = 0; i < totalCardSlots; ++i ) {
m_cards[i].Open(); m_cards[i].Open( m_lastKnownFilter );
} }
} }
@ -1071,5 +1071,6 @@ void FolderMemoryCardAggregator::ReIndex( uint slot, const wxString& filter ) {
m_cards[slot].Close(); m_cards[slot].Close();
Console.WriteLn( Color_Green, L"(FolderMcd) Re-Indexing slot %u with filter \"%s\"", slot, WX_STR( filter ) ); Console.WriteLn( Color_Green, L"(FolderMcd) Re-Indexing slot %u with filter \"%s\"", slot, WX_STR( filter ) );
m_cards[slot].Open( filter ); m_cards[slot].Open( filter );
m_lastKnownFilter = filter;
} }

View File

@ -298,6 +298,7 @@ class FolderMemoryCardAggregator {
protected: protected:
static const int totalCardSlots = 8; static const int totalCardSlots = 8;
FolderMemoryCard m_cards[totalCardSlots]; FolderMemoryCard m_cards[totalCardSlots];
wxString m_lastKnownFilter = L"";
public: public:
FolderMemoryCardAggregator(); FolderMemoryCardAggregator();