From 5d08e9b495a2315e8a4758a8123466665085d044 Mon Sep 17 00:00:00 2001 From: Ac_K Date: Wed, 15 Sep 2021 01:24:49 +0200 Subject: hos: Cleanup the project (#2634) * hos: Cleanup the project Since a lot of changes has been done on the HOS project, there are some leftover here and there, or class just used in one service, things at wrong places, and more. This PR fixes that, additionnally to that, I've realigned some vars because I though it make the code more readable. * Address gdkchan feedback * addresses Thog feedback * Revert ElfSymbol --- Ryujinx.HLE/HOS/LibHacHorizonManager.cs | 38 ++++++++++++--------------------- 1 file changed, 14 insertions(+), 24 deletions(-) (limited to 'Ryujinx.HLE/HOS/LibHacHorizonManager.cs') diff --git a/Ryujinx.HLE/HOS/LibHacHorizonManager.cs b/Ryujinx.HLE/HOS/LibHacHorizonManager.cs index 61e0227f..f8975dd1 100644 --- a/Ryujinx.HLE/HOS/LibHacHorizonManager.cs +++ b/Ryujinx.HLE/HOS/LibHacHorizonManager.cs @@ -16,16 +16,15 @@ namespace Ryujinx.HLE.HOS public class LibHacHorizonManager { private LibHac.Horizon Server { get; set; } - public HorizonClient RyujinxClient { get; private set; } + public HorizonClient RyujinxClient { get; private set; } public HorizonClient ApplicationClient { get; private set; } - - public HorizonClient AccountClient { get; private set; } - public HorizonClient AmClient { get; private set; } - public HorizonClient BcatClient { get; private set; } - public HorizonClient FsClient { get; private set; } - public HorizonClient NsClient { get; private set; } - public HorizonClient SdbClient { get; private set; } + public HorizonClient AccountClient { get; private set; } + public HorizonClient AmClient { get; private set; } + public HorizonClient BcatClient { get; private set; } + public HorizonClient FsClient { get; private set; } + public HorizonClient NsClient { get; private set; } + public HorizonClient SdbClient { get; private set; } internal LibHacIReader ArpIReader { get; private set; } @@ -49,8 +48,7 @@ namespace Ryujinx.HLE.HOS public void InitializeBcatServer() { - BcatClient = Server.CreateHorizonClient(new ProgramLocation(SystemProgramId.Bcat, StorageId.BuiltInSystem), - BcatFsPermissions); + BcatClient = Server.CreateHorizonClient(new ProgramLocation(SystemProgramId.Bcat, StorageId.BuiltInSystem), BcatFsPermissions); _ = new BcatServer(BcatClient); } @@ -66,23 +64,15 @@ namespace Ryujinx.HLE.HOS public void InitializeSystemClients() { - AccountClient = Server.CreateHorizonClient(new ProgramLocation(SystemProgramId.Account, StorageId.BuiltInSystem), - AccountFsPermissions); - - AmClient = Server.CreateHorizonClient(new ProgramLocation(SystemProgramId.Am, StorageId.BuiltInSystem), - AmFsPermissions); - - NsClient = Server.CreateHorizonClient(new ProgramLocation(SystemProgramId.Ns, StorageId.BuiltInSystem), - NsFsPermissions); - - SdbClient = Server.CreateHorizonClient(new ProgramLocation(SystemProgramId.Sdb, StorageId.BuiltInSystem), - SdbFacData, SdbFacDescriptor); + AccountClient = Server.CreateHorizonClient(new ProgramLocation(SystemProgramId.Account, StorageId.BuiltInSystem), AccountFsPermissions); + AmClient = Server.CreateHorizonClient(new ProgramLocation(SystemProgramId.Am, StorageId.BuiltInSystem), AmFsPermissions); + NsClient = Server.CreateHorizonClient(new ProgramLocation(SystemProgramId.Ns, StorageId.BuiltInSystem), NsFsPermissions); + SdbClient = Server.CreateHorizonClient(new ProgramLocation(SystemProgramId.Sdb, StorageId.BuiltInSystem), SdbFacData, SdbFacDescriptor); } public void InitializeApplicationClient(ProgramId programId, in Npdm npdm) { - ApplicationClient = Server.CreateHorizonClient(new ProgramLocation(programId, StorageId.BuiltInUser), - npdm.FsAccessControlData, npdm.FsAccessControlDescriptor); + ApplicationClient = Server.CreateHorizonClient(new ProgramLocation(programId, StorageId.BuiltInUser), npdm.FsAccessControlData, npdm.FsAccessControlDescriptor); } // This function was added to avoid errors that come from a user's keys or SD encryption seed changing. @@ -147,4 +137,4 @@ namespace Ryujinx.HLE.HOS 0x01, 0x09, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }; } -} +} \ No newline at end of file -- cgit v1.2.3