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
This commit is contained in:
@ -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
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user