Core: Bring over some file related Switch changes.

Reducing the distance from the Switch port code.
This commit is contained in:
Unknown W. Brackets 2020-03-03 22:53:03 -08:00
parent 051a84e9bd
commit cb1b7b1e43
10 changed files with 40 additions and 13 deletions

View file

@ -442,7 +442,8 @@ void DirectoryFileHandle::Close()
if (SetEndOfFile(hFile) == 0) {
ERROR_LOG_REPORT(FILESYS, "Failed to truncate file.");
}
#else
#elif !PPSSPP_PLATFORM(SWITCH)
// Note: it's not great that Switch cannot truncate appropriately...
if (ftruncate(hFile, (off_t)needsTrunc_) != 0) {
ERROR_LOG_REPORT(FILESYS, "Failed to truncate file.");
}