mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
small update, adds check to importFile so only one save per game allowed, adds check to remove file so removing last file on memcard will not corrupt it
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1120 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -207,7 +207,8 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
|
||||
int slot = 1;
|
||||
int index2 = index1;
|
||||
std::string fileName2("");
|
||||
int freeblocks = 0;
|
||||
int freeBlocks = 0;
|
||||
wxString blocksOpen;
|
||||
|
||||
switch (event.GetId())
|
||||
{
|
||||
@ -296,12 +297,9 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
|
||||
wxT("Success"),wxOK);
|
||||
break;
|
||||
case OUTOFBLOCKS:
|
||||
freeblocks = BE16(memoryCard[slot]->bat.FreeBlocks);
|
||||
{
|
||||
wxString Foobar;
|
||||
Foobar.Printf(wxT("Only %d blocks available"), freeblocks);
|
||||
wxMessageBox(Foobar,wxT("Failure"),wxOK);
|
||||
}
|
||||
freeBlocks = BE16(memoryCard[slot]->bat.FreeBlocks);
|
||||
blocksOpen.Printf(wxT("Only %d blocks available"), freeBlocks);
|
||||
wxMessageBox(blocksOpen,wxT("Failure"),wxOK);
|
||||
break;
|
||||
case OUTOFDIRENTRIES:
|
||||
wxMessageBox(wxT("No free dir index entries"),
|
||||
@ -311,6 +309,10 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
|
||||
wxMessageBox(wxT("File is not recognized as a memcard"),
|
||||
wxT("Failure"),wxOK);
|
||||
break;
|
||||
case TITLEPRESENT:
|
||||
wxMessageBox(wxT("Memcard already has a save for this title"),
|
||||
wxT("Failure"),wxOK);
|
||||
break;
|
||||
default:
|
||||
memoryCard[slot]->Save();
|
||||
slot == 1 ? ReloadMemcard(m_Memcard2Path->GetPath().mb_str(), 1)
|
||||
|
Reference in New Issue
Block a user