mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Android: Correct truncation behavior.
This commit is contained in:
1 parent
51c21ce7c4
commit
456a38b1c5
1 file changed
+3
-1
@@ -201,8 +201,10 @@ bool DirectoryFileHandle::Open(const Path &basePath, std::string &fileName, File
|
||||
flags |= File::OPEN_APPEND;
|
||||
if (access & FILEACCESS_CREATE)
|
||||
flags |= File::OPEN_CREATE;
|
||||
// Important: don't pass TRUNCATE here, the PSP truncates weirdly. See #579.
|
||||
// See above about truncate behavior. Just add READ to preserve data here.
|
||||
if (access & FILEACCESS_TRUNCATE)
|
||||
flags |= File::OPEN_TRUNCATE;
|
||||
flags |= File::OPEN_READ;
|
||||
|
||||
int fd = File::OpenFD(fullName, (File::OpenFlag)flags);
|
||||
// Try to detect reads/writes to PSP/GAME to avoid them in replays.
|
||||
|
||||
Reference in new issue
Block a user