mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-23 18:45:36 +00:00
sceKernelWrite hack
Seems like std::fwrite has some weird edge cases we aren't handling properly. Until we get to the bottom of this issue, here's a hack that bypasses it. This fixes saves in DRAGON BALL XENOVERSE (CUSA01341)
This commit is contained in:
parent
ae638c04c3
commit
ea92214ff5
@ -293,7 +293,12 @@ s64 PS4_SYSV_ABI write(s32 fd, const void* buf, size_t nbytes) {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return file->f.WriteRaw<u8>(buf, nbytes);
|
||||
auto written_bytes = file->f.WriteRaw<u8>(buf, nbytes);
|
||||
auto file_size = file->f.GetSize();
|
||||
if (file_size != written_bytes) {
|
||||
file->f.SetSize(written_bytes);
|
||||
}
|
||||
return written_bytes;
|
||||
}
|
||||
|
||||
s64 PS4_SYSV_ABI posix_write(s32 fd, const void* buf, size_t nbytes) {
|
||||
|
Loading…
Reference in New Issue
Block a user