mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
Merge pull request #264 from Subv/files
Kernel/File: Fixed file read/write hwtests
This commit is contained in:
commit
1f4953e1bb
1 changed files with 6 additions and 3 deletions
|
@ -38,12 +38,15 @@ bool File_SDMC::Open() {
|
|||
}
|
||||
|
||||
std::string mode_string;
|
||||
if (mode.read_flag && mode.write_flag)
|
||||
if (mode.create_flag)
|
||||
mode_string = "w+";
|
||||
else if (mode.write_flag)
|
||||
mode_string = "r+"; // Files opened with Write access can be read from
|
||||
else if (mode.read_flag)
|
||||
mode_string = "r";
|
||||
else if (mode.write_flag)
|
||||
mode_string = "w";
|
||||
|
||||
// Open the file in binary mode, to avoid problems with CR/LF on Windows systems
|
||||
mode_string += "b";
|
||||
|
||||
file = new FileUtil::IOFile(path, mode_string.c_str());
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue