diff options
author | Shane Slattery <Slattz@users.noreply.github.com> | 2022-12-04 19:46:02 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-04 19:46:02 +0000 |
commit | aedfadaaf710d8f363b730f82f8e82437a43e115 (patch) | |
tree | 5e766c99fc6be423066b5882f257cdd0915d9628 /Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs | |
parent | 5c0fb0cec30028a155a48ed0b9569abc6ec4c13b (diff) |
Add InfoType.MesosphereCurrentProcess (#3792)1.1.423
* Add InfoType.MesosphereCurrentProcess
* Make outHandle inlined
Co-authored-by: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Co-authored-by: TSRBerry <20988865+TSRBerry@users.noreply.github.com>
Diffstat (limited to 'Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs')
-rw-r--r-- | Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs b/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs index 189e4a3e..c3fb8b8a 100644 --- a/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs +++ b/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs @@ -2107,6 +2107,33 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall break; } + case InfoType.MesosphereCurrentProcess: + { + if (handle != 0) + { + return KernelResult.InvalidHandle; + } + + if ((ulong)subId != 0) + { + return KernelResult.InvalidCombination; + } + + KProcess currentProcess = KernelStatic.GetCurrentProcess(); + KHandleTable handleTable = currentProcess.HandleTable; + + KernelResult result = handleTable.GenerateHandle(currentProcess, out int outHandle); + + if (result != KernelResult.Success) + { + return result; + } + + value = (ulong)outHandle; + + break; + } + default: return KernelResult.InvalidEnumValue; } |