kernel: Improve GetInfo readability and update to 13.0.0 (#2900)

* kernel: Define InfoTYpe and make it less obscure when reading GetInfo

Also map ThreadTickCount to 25 instead of 0xF0000002 like 13.x kernel.

* kernel: Implement GetInfo IsApplication

* kernel: Implement GetInfo FreeThreadCount
This commit is contained in:
Mary 2021-12-05 00:23:26 +01:00 committed by GitHub
parent f39fce8f54
commit 2ab777885b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 98 additions and 47 deletions

View file

@ -404,7 +404,7 @@ namespace Ryujinx.HLE.HOS
lock (KernelContext.Processes)
{
// Terminate application.
foreach (KProcess process in KernelContext.Processes.Values.Where(x => x.Flags.HasFlag(ProcessCreationFlags.IsApplication)))
foreach (KProcess process in KernelContext.Processes.Values.Where(x => x.IsApplication))
{
process.Terminate();
process.DecrementReferenceCount();
@ -415,7 +415,7 @@ namespace Ryujinx.HLE.HOS
// Terminate HLE services (must be done after the application is already terminated,
// otherwise the application will receive errors due to service termination).
foreach (KProcess process in KernelContext.Processes.Values.Where(x => !x.Flags.HasFlag(ProcessCreationFlags.IsApplication)))
foreach (KProcess process in KernelContext.Processes.Values.Where(x => !x.IsApplication))
{
process.Terminate();
process.DecrementReferenceCount();
@ -461,7 +461,7 @@ namespace Ryujinx.HLE.HOS
{
foreach (KProcess process in KernelContext.Processes.Values)
{
if (process.Flags.HasFlag(ProcessCreationFlags.IsApplication))
if (process.IsApplication)
{
// Only game process should be paused.
process.SetActivity(pause);