From 1fd547aba47bc4adc94b623b418276d96961c229 Mon Sep 17 00:00:00 2001 From: TSR Berry <20988865+TSRBerry@users.noreply.github.com> Date: Sun, 2 Apr 2023 20:12:23 +0200 Subject: [PATCH] Extract titleName from nacp --- Ryujinx.HLE/Loaders/Processes/ProcessLoaderHelper.cs | 2 +- Ryujinx.HLE/Loaders/Processes/ProcessResult.cs | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Ryujinx.HLE/Loaders/Processes/ProcessLoaderHelper.cs b/Ryujinx.HLE/Loaders/Processes/ProcessLoaderHelper.cs index 7176445e5..fc9788e40 100644 --- a/Ryujinx.HLE/Loaders/Processes/ProcessLoaderHelper.cs +++ b/Ryujinx.HLE/Loaders/Processes/ProcessLoaderHelper.cs @@ -405,7 +405,7 @@ namespace Ryujinx.HLE.Loaders.Processes // Once everything is loaded, we can load cheats. device.Configuration.VirtualFileSystem.ModLoader.LoadCheats(programId, tamperInfo, device.TamperMachine); - return new ProcessResult(metaLoader, applicationControlProperties, diskCacheEnabled, allowCodeMemoryForJit, processContextFactory.DiskCacheLoadState, process.Pid, meta.MainThreadPriority, meta.MainThreadStackSize); + return new ProcessResult(metaLoader, applicationControlProperties, diskCacheEnabled, allowCodeMemoryForJit, processContextFactory.DiskCacheLoadState, process.Pid, meta.MainThreadPriority, meta.MainThreadStackSize, device.System.State.DesiredTitleLanguage); } public static Result LoadIntoMemory(KProcess process, IExecutable image, ulong baseAddress) diff --git a/Ryujinx.HLE/Loaders/Processes/ProcessResult.cs b/Ryujinx.HLE/Loaders/Processes/ProcessResult.cs index 6bbeee1b8..cad55e741 100644 --- a/Ryujinx.HLE/Loaders/Processes/ProcessResult.cs +++ b/Ryujinx.HLE/Loaders/Processes/ProcessResult.cs @@ -2,6 +2,7 @@ using LibHac.Ns; using Ryujinx.Common.Logging; using Ryujinx.Cpu; +using Ryujinx.HLE.HOS.SystemState; using Ryujinx.HLE.Loaders.Processes.Extensions; using Ryujinx.Horizon.Common; @@ -9,7 +10,7 @@ namespace Ryujinx.HLE.Loaders.Processes { public struct ProcessResult { - public static ProcessResult Failed => new(null, new ApplicationControlProperty(), false, false, null, 0, 0, 0); + public static ProcessResult Failed => new(null, new ApplicationControlProperty(), false, false, null, 0, 0, 0, TitleLanguage.AmericanEnglish); private readonly byte _mainThreadPriority; private readonly uint _mainThreadStackSize; @@ -35,7 +36,9 @@ namespace Ryujinx.HLE.Loaders.Processes IDiskCacheLoadState diskCacheLoadState, ulong pid, byte mainThreadPriority, - uint mainThreadStackSize) + uint mainThreadStackSize, + TitleLanguage titleLanguage + ) { _mainThreadPriority = mainThreadPriority; _mainThreadStackSize = mainThreadStackSize; @@ -50,7 +53,7 @@ namespace Ryujinx.HLE.Loaders.Processes { ulong programId = metaLoader.GetProgramId(); - Name = metaLoader.GetProgramName(); + Name = ApplicationControlProperties.Title[(int)titleLanguage].NameString.ToString(); ProgramId = programId; ProgramIdText = $"{programId:x16}"; Is64Bit = metaLoader.IsProgram64Bit();