From 95aac4ff6841b6557e3d74fd161bc7e96ce2b61e Mon Sep 17 00:00:00 2001 From: LPFaint99 Date: Thu, 19 Sep 2013 12:06:30 -0700 Subject: [PATCH] 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. --- Source/Core/Core/Src/HW/GCMemcard.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/Src/HW/GCMemcard.cpp b/Source/Core/Core/Src/HW/GCMemcard.cpp index 4da694b123..b4aa9993de 100644 --- a/Source/Core/Core/Src/HW/GCMemcard.cpp +++ b/Source/Core/Core/Src/HW/GCMemcard.cpp @@ -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))