mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-04 16:32:39 +00:00
be sure, if seek really return error
This commit is contained in:
parent
806913baf5
commit
6fe72758de
@ -317,15 +317,14 @@ s64 PS4_SYSV_ABI sceKernelLseek(int d, s64 offset, int whence) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
s64 PS4_SYSV_ABI posix_lseek(int d, s64 offset, int whence) {
|
s64 PS4_SYSV_ABI posix_lseek(int d, s64 offset, int whence) {
|
||||||
// Workaround for XNA AudioEngine
|
|
||||||
if (whence == SEEK_SET && (s32)offset == -1) {
|
|
||||||
SetPosixErrno(EINVAL);
|
|
||||||
return offset;
|
|
||||||
}
|
|
||||||
|
|
||||||
s64 result = sceKernelLseek(d, offset, whence);
|
s64 result = sceKernelLseek(d, offset, whence);
|
||||||
if (result < 0) {
|
if (result < 0) {
|
||||||
LOG_ERROR(Kernel_Pthread, "posix_lseek: error = {}", result);
|
LOG_ERROR(Kernel_Pthread, "posix_lseek: error = {}", result);
|
||||||
|
// Workaround for XNA AudioEngine
|
||||||
|
if (whence == SEEK_SET && (s32)offset == -1) {
|
||||||
|
SetPosixErrno(EINVAL);
|
||||||
|
return offset;
|
||||||
|
}
|
||||||
ErrSceToPosix(result);
|
ErrSceToPosix(result);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user