From 6417a4816de64f70d781fc77b77e87eb33e70f38 Mon Sep 17 00:00:00 2001 From: sum2012 Date: Sun, 15 Sep 2024 08:43:36 +0800 Subject: [PATCH] Fix PSP_STDIN and PSP_MIN_FD value According JPCSP source https://github.com/jpcsp/jpcsp/blob/bb94cd4f9b211d3efa5519c6f218764be2985589/src/jpcsp/HLE/modules/IoFileMgrForUser.java#L171 Fix #19435 --- Core/HLE/sceIo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/HLE/sceIo.cpp b/Core/HLE/sceIo.cpp index 7b310b8f71..b04dbdce02 100644 --- a/Core/HLE/sceIo.cpp +++ b/Core/HLE/sceIo.cpp @@ -125,11 +125,11 @@ typedef s64 SceOff; typedef u64 SceIores; const int PSP_COUNT_FDS = 64; -// TODO: Should be 3, and stdin/stdout/stderr are special values aliased to 0? -const int PSP_MIN_FD = 4; +// TODO: stdin/stdout/stderr are special values aliased to 0? +const int PSP_MIN_FD = 3; const int PSP_STDOUT = 1; const int PSP_STDERR = 2; -const int PSP_STDIN = 3; +const int PSP_STDIN = 0; static int asyncNotifyEvent = -1; static int syncNotifyEvent = -1; static SceUID fds[PSP_COUNT_FDS];