Memcard Manager:change error message for delete failure and remove unnecessary #defines
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3829 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
ccfc004161
commit
9bc2e789d3
|
@ -326,7 +326,7 @@ void CMemcardManager::ChangePath(int id)
|
||||||
if (!strcasecmp(m_MemcardPath[slot2]->GetPath().mb_str(), m_MemcardPath[slot]->GetPath().mb_str()))
|
if (!strcasecmp(m_MemcardPath[slot2]->GetPath().mb_str(), m_MemcardPath[slot]->GetPath().mb_str()))
|
||||||
{
|
{
|
||||||
if(!m_MemcardPath[slot]->GetPath().IsEmpty())
|
if(!m_MemcardPath[slot]->GetPath().IsEmpty())
|
||||||
PanicAlert(E_ALREADYOPENED);
|
PanicAlert("Memcard already opened");
|
||||||
}
|
}
|
||||||
else if (ReloadMemcard(m_MemcardPath[slot]->GetPath().mb_str(), slot))
|
else if (ReloadMemcard(m_MemcardPath[slot]->GetPath().mb_str(), slot))
|
||||||
{
|
{
|
||||||
|
@ -460,10 +460,10 @@ bool CMemcardManager::CopyDeleteSwitch(u32 error, int slot)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NOMEMCARD:
|
case NOMEMCARD:
|
||||||
PanicAlert(E_NOMEMCARD);
|
PanicAlert("File is not recognized as a memcard");
|
||||||
break;
|
break;
|
||||||
case OPENFAIL:
|
case OPENFAIL:
|
||||||
PanicAlert(E_OPENFAIL);
|
PanicAlert("File could not be opened\nor does not have a valid extension");
|
||||||
break;
|
break;
|
||||||
case OUTOFBLOCKS:
|
case OUTOFBLOCKS:
|
||||||
if (slot == -1)
|
if (slot == -1)
|
||||||
|
@ -471,25 +471,25 @@ bool CMemcardManager::CopyDeleteSwitch(u32 error, int slot)
|
||||||
PanicAlert(E_UNK);
|
PanicAlert(E_UNK);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
PanicAlert(E_OUTOFBLOCKS, memoryCard[slot]->GetFreeBlocks());
|
PanicAlert("Only %d blocks available", memoryCard[slot]->GetFreeBlocks());
|
||||||
break;
|
break;
|
||||||
case OUTOFDIRENTRIES:
|
case OUTOFDIRENTRIES:
|
||||||
PanicAlert(E_OUTOFDIRENTRIES);
|
PanicAlert("No free dir index entries");
|
||||||
break;
|
break;
|
||||||
case LENGTHFAIL:
|
case LENGTHFAIL:
|
||||||
PanicAlert(E_LENGTHFAIL);
|
PanicAlert("Imported file has invalid length");
|
||||||
break;
|
break;
|
||||||
case INVALIDFILESIZE:
|
case INVALIDFILESIZE:
|
||||||
PanicAlert(E_INVALIDFILESIZE);
|
PanicAlert("The save you are trying to copy has an invalid file size");
|
||||||
break;
|
break;
|
||||||
case TITLEPRESENT:
|
case TITLEPRESENT:
|
||||||
PanicAlert(E_TITLEPRESENT);
|
PanicAlert("Memcard already has a save for this title");
|
||||||
break;
|
break;
|
||||||
case SAVFAIL:
|
case SAVFAIL:
|
||||||
PanicAlert(E_SAVFAIL);
|
PanicAlert("Imported file has sav extension\nbut does not have a correct header");
|
||||||
break;
|
break;
|
||||||
case GCSFAIL:
|
case GCSFAIL:
|
||||||
PanicAlert(E_GCSFAIL);
|
PanicAlert("Imported file has gsc extension\nbut does not have a correct header");
|
||||||
break;
|
break;
|
||||||
case FAIL:
|
case FAIL:
|
||||||
if (slot == -1)
|
if (slot == -1)
|
||||||
|
@ -497,11 +497,15 @@ bool CMemcardManager::CopyDeleteSwitch(u32 error, int slot)
|
||||||
PanicAlert("Export Failed");
|
PanicAlert("Export Failed");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
PanicAlert(E_INVALID);
|
PanicAlert("Invalid bat.map or dir entry");
|
||||||
break;
|
break;
|
||||||
case WRITEFAIL:
|
case WRITEFAIL:
|
||||||
PanicAlert(E_SAVEFAILED);
|
PanicAlert(E_SAVEFAILED);
|
||||||
break;
|
break;
|
||||||
|
case DELETE_FAIL:
|
||||||
|
PanicAlert("Order of files in the File Directory do not match the block order\n"
|
||||||
|
"Right click and export all of the saves,\nand import the the saves to a new memcard\n");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
PanicAlert(E_UNK);
|
PanicAlert(E_UNK);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -33,17 +33,7 @@
|
||||||
#undef MEMCARD_MANAGER_STYLE
|
#undef MEMCARD_MANAGER_STYLE
|
||||||
#define MEMCARD_MANAGER_STYLE wxCAPTION | wxSYSTEM_MENU | wxDIALOG_NO_PARENT | wxCLOSE_BOX | wxRESIZE_BORDER | wxMAXIMIZE_BOX
|
#define MEMCARD_MANAGER_STYLE wxCAPTION | wxSYSTEM_MENU | wxDIALOG_NO_PARENT | wxCLOSE_BOX | wxRESIZE_BORDER | wxMAXIMIZE_BOX
|
||||||
#define MEMCARDMAN_TITLE "Memory Card Manager WARNING-Make backups before using, should be fixed but could mangle stuff!"
|
#define MEMCARDMAN_TITLE "Memory Card Manager WARNING-Make backups before using, should be fixed but could mangle stuff!"
|
||||||
#define E_ALREADYOPENED "Memcard already opened"
|
|
||||||
#define E_INVALID "Invalid bat.map or dir entry"
|
|
||||||
#define E_NOMEMCARD "File is not recognized as a memcard"
|
|
||||||
#define E_TITLEPRESENT "Memcard already has a save for this title"
|
|
||||||
#define E_INVALIDFILESIZE "The save you are trying to copy has an invalid file size"
|
|
||||||
#define E_OUTOFBLOCKS "Only %d blocks available"
|
|
||||||
#define E_OUTOFDIRENTRIES "No free dir index entries"
|
|
||||||
#define E_LENGTHFAIL "Imported file has invalid length"
|
|
||||||
#define E_GCSFAIL "Imported file has gsc extension\nbut does not have a correct header"
|
|
||||||
#define E_SAVFAIL "Imported file has sav extension\nbut does not have a correct header"
|
|
||||||
#define E_OPENFAIL "File could not be opened\nor does not have a valid extension"
|
|
||||||
#define E_SAVEFAILED "File write failed"
|
#define E_SAVEFAILED "File write failed"
|
||||||
#define E_UNK "Unknown error"
|
#define E_UNK "Unknown error"
|
||||||
#define FIRSTPAGE 0
|
#define FIRSTPAGE 0
|
||||||
|
|
|
@ -671,7 +671,7 @@ u32 GCMemcard::RemoveFile(u8 index) //index in the directory array
|
||||||
for (int i = 0; i < DIRLEN; i++)
|
for (int i = 0; i < DIRLEN; i++)
|
||||||
{
|
{
|
||||||
if (startingblock > BE16(dir.Dir[i].FirstBlock))
|
if (startingblock > BE16(dir.Dir[i].FirstBlock))
|
||||||
return FAIL;
|
return DELETE_FAIL;
|
||||||
startingblock = BE16(dir.Dir[i].FirstBlock);
|
startingblock = BE16(dir.Dir[i].FirstBlock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,7 @@ enum
|
||||||
GCSFAIL,
|
GCSFAIL,
|
||||||
FAIL,
|
FAIL,
|
||||||
WRITEFAIL,
|
WRITEFAIL,
|
||||||
|
DELETE_FAIL,
|
||||||
|
|
||||||
MC_FST_BLOCKS = 0x05,
|
MC_FST_BLOCKS = 0x05,
|
||||||
MBIT_TO_BLOCKS = 0x10,
|
MBIT_TO_BLOCKS = 0x10,
|
||||||
|
|
Loading…
Reference in New Issue