mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-23 13:02:08 +00:00
forgot to stage this file
This commit is contained in:
parent
636b398d8e
commit
25203fc167
1 changed files with 30 additions and 1 deletions
|
|
@ -10,7 +10,7 @@ namespace Ryujinx.HLE.Loaders.Processes
|
|||
{
|
||||
public class ProcessResult
|
||||
{
|
||||
public static ProcessResult Failed => new(null, new BlitStruct<ApplicationControlProperty>(1), false, false, null, 0, 0, 0, TitleLanguage.AmericanEnglish);
|
||||
public static ProcessResult Failed => new(null, new BlitStruct<ApplicationControlProperty>(1), false, false, null, 0, 0, 0, 0, TitleLanguage.AmericanEnglish);
|
||||
|
||||
private readonly byte _mainThreadPriority;
|
||||
private readonly uint _mainThreadStackSize;
|
||||
|
|
@ -28,6 +28,7 @@ namespace Ryujinx.HLE.Loaders.Processes
|
|||
public readonly bool Is64Bit;
|
||||
public readonly bool DiskCacheEnabled;
|
||||
public readonly bool AllowCodeMemoryForJit;
|
||||
public readonly ProcessIdentity Identity;
|
||||
|
||||
public ProcessResult(
|
||||
MetaLoader metaLoader,
|
||||
|
|
@ -36,6 +37,7 @@ namespace Ryujinx.HLE.Loaders.Processes
|
|||
bool allowCodeMemoryForJit,
|
||||
IDiskCacheLoadState diskCacheLoadState,
|
||||
ulong pid,
|
||||
byte programIndex,
|
||||
byte mainThreadPriority,
|
||||
uint mainThreadStackSize,
|
||||
TitleLanguage titleLanguage)
|
||||
|
|
@ -71,6 +73,7 @@ namespace Ryujinx.HLE.Loaders.Processes
|
|||
ProgramId = programId;
|
||||
ProgramIdText = $"{programId:x16}";
|
||||
Is64Bit = metaLoader.IsProgram64Bit;
|
||||
Identity = new ProcessIdentity(pid, programId, programIndex, DisplayVersion, GetProcessKind(programId));
|
||||
}
|
||||
|
||||
else
|
||||
|
|
@ -84,6 +87,31 @@ namespace Ryujinx.HLE.Loaders.Processes
|
|||
AllowCodeMemoryForJit = allowCodeMemoryForJit;
|
||||
}
|
||||
|
||||
private static ProcessKind GetProcessKind(ulong programId)
|
||||
{
|
||||
if (programId == 0)
|
||||
{
|
||||
return ProcessKind.Homebrew;
|
||||
}
|
||||
|
||||
if (programId is >= 0x0100000000001000 and <= 0x0100000000001FFF)
|
||||
{
|
||||
return ProcessKind.SystemApplet;
|
||||
}
|
||||
|
||||
if (programId is >= 0x0100000000000800 and <= 0x0100000000000FFF)
|
||||
{
|
||||
return ProcessKind.LibraryApplet;
|
||||
}
|
||||
|
||||
if (programId <= 0x0100000000007FFF)
|
||||
{
|
||||
return ProcessKind.SystemApplication;
|
||||
}
|
||||
|
||||
return ProcessKind.Application;
|
||||
}
|
||||
|
||||
public bool Start(Switch device)
|
||||
{
|
||||
device.Configuration.ContentManager.LoadEntries(device);
|
||||
|
|
@ -109,6 +137,7 @@ namespace Ryujinx.HLE.Loaders.Processes
|
|||
: device.System.ContentManager.GetCurrentFirmwareVersion()?.VersionString ?? "?";
|
||||
|
||||
Logger.Info?.Print(LogClass.Loader, $"Application Loaded: {name} v{version} [{ProgramIdText}] [{(Is64Bit ? "64-bit" : "32-bit")}]");
|
||||
Logger.Info?.Print(LogClass.Loader, $"Process identity: {Identity}");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue