[Kernel] Close random device descriptors

Co-authored-by: Sekai <140012992+SekaixX@users.noreply.github.com>
This commit is contained in:
ParantezTech 2026-10-08 23:44:39 +03:00
parent a662295409
commit cd77a68c87
1 changed files with 6 additions and 1 deletions

View File

@ -2273,7 +2273,12 @@ public static partial class KernelMemoryCompatExports
string? observedBinkPath = null;
lock (_fdGate)
{
if (_openFiles.Remove(fd, out stream))
if (_randomDeviceDescriptors.Remove(fd))
{
ctx[CpuRegister.Rax] = 0;
return (int)OrbisGen2Result.ORBIS_GEN2_OK;
}
else if (_openFiles.Remove(fd, out stream))
{
_binkGuestCompletionShims.Remove(fd);
if (_observedBinkGuestFiles.Remove(fd, out observedBinkPath))