mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-03 07:52:31 +00:00
Remove close hack
Since LLE libSceDiscMap is no longer a concern, this hack shouldn't be needed. Since sockets are still stubbed, and close can be used on sockets, I've added a warning log just in case this still occurs in some titles.
This commit is contained in:
parent
2f91016345
commit
2333b2d5d3
@ -190,11 +190,9 @@ s32 PS4_SYSV_ABI sceKernelOpen(const char* path, s32 flags, /* SceKernelMode*/ u
|
|||||||
}
|
}
|
||||||
|
|
||||||
s32 PS4_SYSV_ABI close(s32 fd) {
|
s32 PS4_SYSV_ABI close(s32 fd) {
|
||||||
if (fd == 0) {
|
if (fd < 3) {
|
||||||
// Hack to bypass unimplemented posix_socket in LLE libSceDiscMap
|
// This is technically possible, but it's usually caused by some stubbed function instead.
|
||||||
// Without this, it closes stdin because socket returns fd 0
|
LOG_WARNING(Kernel_Fs, "called on an std handle, fd = {}", fd);
|
||||||
*__Error() = POSIX_EBADF;
|
|
||||||
return -1;
|
|
||||||
}
|
}
|
||||||
auto* h = Common::Singleton<Core::FileSys::HandleTable>::Instance();
|
auto* h = Common::Singleton<Core::FileSys::HandleTable>::Instance();
|
||||||
auto* file = h->GetFile(fd);
|
auto* file = h->GetFile(fd);
|
||||||
|
Loading…
Reference in New Issue
Block a user