From 556be08c4e9ad9f508dc2647ef70d3b89c2c242c Mon Sep 17 00:00:00 2001 From: gdkchan Date: Tue, 3 May 2022 18:28:32 -0300 Subject: Implement PM GetProcessInfo atmosphere extension (partially) (#2966) --- Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Ryujinx.HLE/HOS/Kernel/SupervisorCall') diff --git a/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs b/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs index 0c111bc4..d9d492a5 100644 --- a/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs +++ b/Ryujinx.HLE/HOS/Kernel/SupervisorCall/Syscall.cs @@ -7,7 +7,6 @@ using Ryujinx.HLE.HOS.Kernel.Ipc; using Ryujinx.HLE.HOS.Kernel.Memory; using Ryujinx.HLE.HOS.Kernel.Process; using Ryujinx.HLE.HOS.Kernel.Threading; -using Ryujinx.Memory; using System; using System.Threading; @@ -1363,10 +1362,10 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall KCodeMemory codeMemory = currentProcess.HandleTable.GetObject(handle); - // Newer versions of the return also returns an error here if the owner and process + // Newer versions of the kernel also returns an error here if the owner and process // where the operation will happen are the same. We do not return an error here - // because some homebrew requires this to be patched out to work (for JIT). - if (codeMemory == null /* || codeMemory.Owner == currentProcess */) + // for homebrew because some of them requires this to be patched out to work (for JIT). + if (codeMemory == null || (!currentProcess.AllowCodeMemoryForJit && codeMemory.Owner == currentProcess)) { return KernelResult.InvalidHandle; } -- cgit v1.2.3