diff options
| author | Ac_K <Acoustik666@gmail.com> | 2022-03-22 20:46:16 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-22 20:46:16 +0100 |
| commit | e3b36db71c62a34a26b30683dd5ad5410c97cc9c (patch) | |
| tree | 18feea12db46ad2ddcdc207e9fd0e805fd98b7da /Ryujinx.HLE/HOS | |
| parent | ba0171d05464201c1513386b7d0b69b5ea956426 (diff) | |
hle: Some cleanup (#3210)
* hle: Some cleanup
This PR cleaned up a bit the HLE folder and the VirtualFileSystem one, since we use LibHac, we can use some class of it directly instead of duplicate things. The "Content" of VFS folder is removed since it should be handled in the NCM service directly.
A larger cleanup should be done later since there is still be duplicated code here and there.
* Fix Headless.SDL2
* Addresses gdkchan feedback
Diffstat (limited to 'Ryujinx.HLE/HOS')
13 files changed, 24 insertions, 24 deletions
diff --git a/Ryujinx.HLE/HOS/Applets/Error/ErrorApplet.cs b/Ryujinx.HLE/HOS/Applets/Error/ErrorApplet.cs index c0d99a77..6780f802 100644 --- a/Ryujinx.HLE/HOS/Applets/Error/ErrorApplet.cs +++ b/Ryujinx.HLE/HOS/Applets/Error/ErrorApplet.cs @@ -2,10 +2,10 @@ using LibHac.Fs; using LibHac.Fs.Fsa; using LibHac.FsSystem; +using LibHac.Ncm; using LibHac.Tools.FsSystem; using LibHac.Tools.FsSystem.NcaUtils; using Ryujinx.Common.Logging; -using Ryujinx.HLE.FileSystem; using Ryujinx.HLE.HOS.Services.Am.AppletAE; using Ryujinx.HLE.HOS.SystemState; using System; @@ -106,7 +106,7 @@ namespace Ryujinx.HLE.HOS.Applets.Error private string GetMessageText(uint module, uint description, string key) { - string binaryTitleContentPath = _horizon.ContentManager.GetInstalledContentPath(ErrorMessageBinaryTitleId, StorageId.NandSystem, NcaContentType.Data); + string binaryTitleContentPath = _horizon.ContentManager.GetInstalledContentPath(ErrorMessageBinaryTitleId, StorageId.BuiltInSystem, NcaContentType.Data); using (LibHac.Fs.IStorage ncaFileStream = new LocalStorage(_horizon.Device.FileSystem.SwitchPathToSystemPath(binaryTitleContentPath), FileAccess.Read, FileMode.Open)) { diff --git a/Ryujinx.HLE/HOS/Horizon.cs b/Ryujinx.HLE/HOS/Horizon.cs index cadd43ff..24d04c12 100644 --- a/Ryujinx.HLE/HOS/Horizon.cs +++ b/Ryujinx.HLE/HOS/Horizon.cs @@ -10,7 +10,7 @@ using Ryujinx.Audio.Integration; using Ryujinx.Audio.Output; using Ryujinx.Audio.Renderer.Device; using Ryujinx.Audio.Renderer.Server; -using Ryujinx.HLE.FileSystem.Content; +using Ryujinx.HLE.FileSystem; using Ryujinx.HLE.HOS.Kernel; using Ryujinx.HLE.HOS.Kernel.Memory; using Ryujinx.HLE.HOS.Kernel.Process; @@ -238,6 +238,7 @@ namespace Ryujinx.HLE.HOS SurfaceFlinger = new SurfaceFlinger(device); InitializeAudioRenderer(); + InitializeServices(); } private void InitializeAudioRenderer() @@ -288,7 +289,7 @@ namespace Ryujinx.HLE.HOS AudioManager.Start(); } - public void InitializeServices() + private void InitializeServices() { SmServer = new ServerBase(KernelContext, "SmServer", () => new IUserInterface(KernelContext)); diff --git a/Ryujinx.HLE/HOS/Services/Arp/ApplicationLaunchProperty.cs b/Ryujinx.HLE/HOS/Services/Arp/ApplicationLaunchProperty.cs index 5e396110..c985092b 100644 --- a/Ryujinx.HLE/HOS/Services/Arp/ApplicationLaunchProperty.cs +++ b/Ryujinx.HLE/HOS/Services/Arp/ApplicationLaunchProperty.cs @@ -1,4 +1,4 @@ -using Ryujinx.HLE.FileSystem; +using LibHac.Ncm; namespace Ryujinx.HLE.HOS.Services.Arp { @@ -20,7 +20,7 @@ namespace Ryujinx.HLE.HOS.Services.Arp { TitleId = 0x00, Version = 0x00, - BaseGameStorageId = (byte)StorageId.NandSystem, + BaseGameStorageId = (byte)StorageId.BuiltInSystem, UpdateGameStorageId = (byte)StorageId.None }; } @@ -35,7 +35,7 @@ namespace Ryujinx.HLE.HOS.Services.Arp { TitleId = context.Device.Application.TitleId, Version = 0x00, - BaseGameStorageId = (byte)StorageId.NandSystem, + BaseGameStorageId = (byte)StorageId.BuiltInSystem, UpdateGameStorageId = (byte)StorageId.None }; } diff --git a/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs b/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs index 94578303..01e1aa34 100644 --- a/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs +++ b/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs @@ -2,7 +2,6 @@ using LibHac; using LibHac.Common; using LibHac.Fs; using LibHac.Fs.Shim; -using LibHac.FsSrv; using LibHac.FsSrv.Impl; using LibHac.FsSystem; using LibHac.Ncm; @@ -19,7 +18,6 @@ using static Ryujinx.HLE.Utilities.StringUtils; using IFileSystem = LibHac.FsSrv.Sf.IFileSystem; using IStorage = LibHac.FsSrv.Sf.IStorage; using RightsId = LibHac.Fs.RightsId; -using StorageId = Ryujinx.HLE.FileSystem.StorageId; namespace Ryujinx.HLE.HOS.Services.Fs { diff --git a/Ryujinx.HLE/HOS/Services/Hid/Hid.cs b/Ryujinx.HLE/HOS/Services/Hid/Hid.cs index b8833e9e..b1466c78 100644 --- a/Ryujinx.HLE/HOS/Services/Hid/Hid.cs +++ b/Ryujinx.HLE/HOS/Services/Hid/Hid.cs @@ -55,9 +55,11 @@ namespace Ryujinx.HLE.HOS.Services.Hid _storage = storage; SharedMemory = SharedMemory.Create(); + + InitDevices(); } - public void InitDevices() + private void InitDevices() { DebugPad = new DebugPadDevice(_device, true); Touchscreen = new TouchDevice(_device, true); diff --git a/Ryujinx.HLE/HOS/Services/Ncm/Lr/ILocationResolverManager.cs b/Ryujinx.HLE/HOS/Services/Ncm/Lr/ILocationResolverManager.cs index 9f0c61dd..546c0567 100644 --- a/Ryujinx.HLE/HOS/Services/Ncm/Lr/ILocationResolverManager.cs +++ b/Ryujinx.HLE/HOS/Services/Ncm/Lr/ILocationResolverManager.cs @@ -1,4 +1,4 @@ -using Ryujinx.HLE.FileSystem; +using LibHac.Ncm; using Ryujinx.HLE.HOS.Services.Ncm.Lr.LocationResolverManager; namespace Ryujinx.HLE.HOS.Services.Ncm.Lr diff --git a/Ryujinx.HLE/HOS/Services/Ncm/Lr/LocationResolverManager/ILocationResolver.cs b/Ryujinx.HLE/HOS/Services/Ncm/Lr/LocationResolverManager/ILocationResolver.cs index 9928285d..0767b148 100644 --- a/Ryujinx.HLE/HOS/Services/Ncm/Lr/LocationResolverManager/ILocationResolver.cs +++ b/Ryujinx.HLE/HOS/Services/Ncm/Lr/LocationResolverManager/ILocationResolver.cs @@ -1,6 +1,6 @@ using LibHac.FsSystem; +using LibHac.Ncm; using Ryujinx.HLE.FileSystem; -using Ryujinx.HLE.FileSystem.Content; using System.Text; using static Ryujinx.HLE.Utilities.StringUtils; diff --git a/Ryujinx.HLE/HOS/Services/Nim/IShopServiceAccessServerInterface.cs b/Ryujinx.HLE/HOS/Services/Nim/IShopServiceAccessServerInterface.cs index 14d1990b..98f5f6a8 100644 --- a/Ryujinx.HLE/HOS/Services/Nim/IShopServiceAccessServerInterface.cs +++ b/Ryujinx.HLE/HOS/Services/Nim/IShopServiceAccessServerInterface.cs @@ -1,5 +1,5 @@ -using Ryujinx.Common.Logging; -using Ryujinx.HLE.FileSystem; +using LibHac.Ncm; +using Ryujinx.Common.Logging; using Ryujinx.HLE.HOS.Services.Arp; using Ryujinx.HLE.HOS.Services.Nim.ShopServiceAccessServerInterface; diff --git a/Ryujinx.HLE/HOS/Services/Sdb/Pl/SharedFontManager.cs b/Ryujinx.HLE/HOS/Services/Sdb/Pl/SharedFontManager.cs index 13ff1adc..f1ef6a2f 100644 --- a/Ryujinx.HLE/HOS/Services/Sdb/Pl/SharedFontManager.cs +++ b/Ryujinx.HLE/HOS/Services/Sdb/Pl/SharedFontManager.cs @@ -2,11 +2,11 @@ using LibHac.Common; using LibHac.Fs; using LibHac.Fs.Fsa; using LibHac.FsSystem; +using LibHac.Ncm; using LibHac.Tools.FsSystem; using LibHac.Tools.FsSystem.NcaUtils; using Ryujinx.HLE.Exceptions; using Ryujinx.HLE.FileSystem; -using Ryujinx.HLE.FileSystem.Content; using Ryujinx.HLE.HOS.Kernel.Memory; using Ryujinx.HLE.HOS.Services.Sdb.Pl.Types; using System; @@ -63,7 +63,7 @@ namespace Ryujinx.HLE.HOS.Services.Sdb.Pl { if (contentManager.TryGetFontTitle(name, out ulong fontTitle) && contentManager.TryGetFontFilename(name, out string fontFilename)) { - string contentPath = contentManager.GetInstalledContentPath(fontTitle, StorageId.NandSystem, NcaContentType.Data); + string contentPath = contentManager.GetInstalledContentPath(fontTitle, StorageId.BuiltInSystem, NcaContentType.Data); string fontPath = _device.FileSystem.SwitchPathToSystemPath(contentPath); if (!string.IsNullOrWhiteSpace(fontPath)) diff --git a/Ryujinx.HLE/HOS/Services/Settings/ISystemSettingsServer.cs b/Ryujinx.HLE/HOS/Services/Settings/ISystemSettingsServer.cs index ef1a42ba..88888f34 100644 --- a/Ryujinx.HLE/HOS/Services/Settings/ISystemSettingsServer.cs +++ b/Ryujinx.HLE/HOS/Services/Settings/ISystemSettingsServer.cs @@ -3,9 +3,9 @@ using LibHac.Common; using LibHac.Fs; using LibHac.Fs.Fsa; using LibHac.FsSystem; +using LibHac.Ncm; using LibHac.Tools.FsSystem.NcaUtils; using Ryujinx.Common.Logging; -using Ryujinx.HLE.FileSystem; using Ryujinx.HLE.HOS.SystemState; using Ryujinx.HLE.Utilities; using System; @@ -290,7 +290,7 @@ namespace Ryujinx.HLE.HOS.Services.Settings { const ulong SystemVersionTitleId = 0x0100000000000809; - string contentPath = device.System.ContentManager.GetInstalledContentPath(SystemVersionTitleId, StorageId.NandSystem, NcaContentType.Data); + string contentPath = device.System.ContentManager.GetInstalledContentPath(SystemVersionTitleId, StorageId.BuiltInSystem, NcaContentType.Data); if (string.IsNullOrWhiteSpace(contentPath)) { diff --git a/Ryujinx.HLE/HOS/Services/Spl/IGeneralInterface.cs b/Ryujinx.HLE/HOS/Services/Spl/IGeneralInterface.cs index 15625fc2..53c9eb48 100644 --- a/Ryujinx.HLE/HOS/Services/Spl/IGeneralInterface.cs +++ b/Ryujinx.HLE/HOS/Services/Spl/IGeneralInterface.cs @@ -1,5 +1,4 @@ -using Ryujinx.Common.Logging; -using Ryujinx.HLE.FileSystem.Content; +using Ryujinx.HLE.FileSystem; using Ryujinx.HLE.HOS.Kernel.Common; using Ryujinx.HLE.HOS.Services.Spl.Types; diff --git a/Ryujinx.HLE/HOS/Services/Ssl/BuiltInCertificateManager.cs b/Ryujinx.HLE/HOS/Services/Ssl/BuiltInCertificateManager.cs index b585224d..70691e1b 100644 --- a/Ryujinx.HLE/HOS/Services/Ssl/BuiltInCertificateManager.cs +++ b/Ryujinx.HLE/HOS/Services/Ssl/BuiltInCertificateManager.cs @@ -3,13 +3,13 @@ using LibHac.Common; using LibHac.Fs; using LibHac.Fs.Fsa; using LibHac.FsSystem; +using LibHac.Ncm; using LibHac.Tools.FsSystem; using LibHac.Tools.FsSystem.NcaUtils; using Ryujinx.Common.Configuration; using Ryujinx.Common.Logging; using Ryujinx.HLE.Exceptions; using Ryujinx.HLE.FileSystem; -using Ryujinx.HLE.FileSystem.Content; using Ryujinx.HLE.HOS.Services.Ssl.Types; using System; using System.Collections.Generic; @@ -82,7 +82,7 @@ namespace Ryujinx.HLE.HOS.Services.Ssl public string GetCertStoreTitleContentPath() { - return _contentManager.GetInstalledContentPath(CertStoreTitleId, StorageId.NandSystem, NcaContentType.Data); + return _contentManager.GetInstalledContentPath(CertStoreTitleId, StorageId.BuiltInSystem, NcaContentType.Data); } public bool HasCertStoreTitle() diff --git a/Ryujinx.HLE/HOS/Services/Time/TimeZone/TimeZoneContentManager.cs b/Ryujinx.HLE/HOS/Services/Time/TimeZone/TimeZoneContentManager.cs index afcf976a..8ff09026 100644 --- a/Ryujinx.HLE/HOS/Services/Time/TimeZone/TimeZoneContentManager.cs +++ b/Ryujinx.HLE/HOS/Services/Time/TimeZone/TimeZoneContentManager.cs @@ -3,12 +3,12 @@ using LibHac.Common; using LibHac.Fs; using LibHac.Fs.Fsa; using LibHac.FsSystem; +using LibHac.Ncm; using LibHac.Tools.FsSystem; using LibHac.Tools.FsSystem.NcaUtils; using Ryujinx.Common.Logging; using Ryujinx.HLE.Exceptions; using Ryujinx.HLE.FileSystem; -using Ryujinx.HLE.FileSystem.Content; using Ryujinx.HLE.HOS.Services.Time.Clock; using Ryujinx.HLE.Utilities; using System; @@ -241,7 +241,7 @@ namespace Ryujinx.HLE.HOS.Services.Time.TimeZone public string GetTimeZoneBinaryTitleContentPath() { - return _contentManager.GetInstalledContentPath(TimeZoneBinaryTitleId, StorageId.NandSystem, NcaContentType.Data); + return _contentManager.GetInstalledContentPath(TimeZoneBinaryTitleId, StorageId.BuiltInSystem, NcaContentType.Data); } public bool HasTimeZoneBinaryTitle() |
