if a memcard is set to read only, fail more gracefully by reporting when writes to the file fail instead of saying that the file does not exist.

This commit is contained in:
LPFaint99 2013-09-19 12:06:30 -07:00
parent 86d70cee15
commit 95aac4ff68
1 changed files with 3 additions and 1 deletions

View File

@ -52,7 +52,9 @@ GCMemcard::GCMemcard(const char *filename, bool forceCreation, bool sjis)
: m_valid(false)
, m_fileName(filename)
{
File::IOFile mcdFile(m_fileName, "r+b");
// Currently there is a string freeze. instead of adding a new message about needing r/w
// open file read only, if write is denied the error will be reported at that point
File::IOFile mcdFile(m_fileName, "rb");
if (!mcdFile.IsOpen())
{
if (!forceCreation && !AskYesNoT("\"%s\" does not exist.\n Create a new 16MB Memcard?", filename))