mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-10-01 12:30:00 +02:00
Add InfoType.MesosphereCurrentProcess (#3792)
* 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>
This commit is contained in:
parent
5c0fb0cec3
commit
aedfadaaf7
2 changed files with 29 additions and 1 deletions
|
@ -28,6 +28,7 @@
|
||||||
UsedNonSystemMemorySize,
|
UsedNonSystemMemorySize,
|
||||||
IsApplication,
|
IsApplication,
|
||||||
FreeThreadCount,
|
FreeThreadCount,
|
||||||
ThreadTickCount
|
ThreadTickCount,
|
||||||
|
MesosphereCurrentProcess = 65001
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2107,6 +2107,33 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
||||||
break;
|
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;
|
default: return KernelResult.InvalidEnumValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue