summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorLPFaint99 <lpfaint99@gmail.com>2013-09-19 12:06:30 -0700
committerLPFaint99 <lpfaint99@gmail.com>2013-09-20 12:08:58 -0700
commit95aac4ff6841b6557e3d74fd161bc7e96ce2b61e (patch)
tree79978b06af3f86f6a3c4cca5e862ac1d3599c876 /Source/Core
parent86d70cee152f6ce01696f8439cf874e32a8662a1 (diff)
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.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/Src/HW/GCMemcard.cpp4
1 files changed, 3 insertions, 1 deletions
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))