mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-02 15:32:52 +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) {
|
||||
if (fd == 0) {
|
||||
// Hack to bypass unimplemented posix_socket in LLE libSceDiscMap
|
||||
// Without this, it closes stdin because socket returns fd 0
|
||||
*__Error() = POSIX_EBADF;
|
||||
return -1;
|
||||
if (fd < 3) {
|
||||
// This is technically possible, but it's usually caused by some stubbed function instead.
|
||||
LOG_WARNING(Kernel_Fs, "called on an std handle, fd = {}", fd);
|
||||
}
|
||||
auto* h = Common::Singleton<Core::FileSys::HandleTable>::Instance();
|
||||
auto* file = h->GetFile(fd);
|
||||
|
Loading…
Reference in New Issue
Block a user