From a2e44a01ebf72527232b2144d3b92d60cb56c44c Mon Sep 17 00:00:00 2001 From: gdkchan Date: Thu, 16 Aug 2018 12:38:10 -0300 Subject: [PATCH] Rename VFs to FileSystem --- Ryujinx.HLE/HOS/Font/SharedFontManager.cs | 2 +- Ryujinx.HLE/HOS/Horizon.cs | 6 ++-- Ryujinx.HLE/HOS/Process.cs | 2 +- .../HOS/Services/FspSrv/IFileSystem.cs | 28 +++++++++---------- .../HOS/Services/FspSrv/IFileSystemProxy.cs | 8 +++--- Ryujinx.HLE/Switch.cs | 6 ++-- 6 files changed, 26 insertions(+), 26 deletions(-) diff --git a/Ryujinx.HLE/HOS/Font/SharedFontManager.cs b/Ryujinx.HLE/HOS/Font/SharedFontManager.cs index cb76700d9a..0be5e89670 100644 --- a/Ryujinx.HLE/HOS/Font/SharedFontManager.cs +++ b/Ryujinx.HLE/HOS/Font/SharedFontManager.cs @@ -34,7 +34,7 @@ namespace Ryujinx.HLE.HOS.Font Memory = Device.Memory; - FontsPath = Path.Combine(Device.VFs.GetSystemPath(), "fonts"); + FontsPath = Path.Combine(Device.FileSystem.GetSystemPath(), "fonts"); } public void EnsureInitialized() diff --git a/Ryujinx.HLE/HOS/Horizon.cs b/Ryujinx.HLE/HOS/Horizon.cs index 48d559d09e..a557967523 100644 --- a/Ryujinx.HLE/HOS/Horizon.cs +++ b/Ryujinx.HLE/HOS/Horizon.cs @@ -58,7 +58,7 @@ namespace Ryujinx.HLE.HOS { if (RomFsFile != null) { - Device.VFs.LoadRomFs(RomFsFile); + Device.FileSystem.LoadRomFs(RomFsFile); } string NpdmFileName = Path.Combine(ExeFsDir, "main.npdm"); @@ -124,12 +124,12 @@ namespace Ryujinx.HLE.HOS bool IsNro = Path.GetExtension(FilePath).ToLower() == ".nro"; string Name = Path.GetFileNameWithoutExtension(FilePath); - string SwitchFilePath = Device.VFs.SystemPathToSwitchPath(FilePath); + string SwitchFilePath = Device.FileSystem.SystemPathToSwitchPath(FilePath); if (IsNro && (SwitchFilePath == null || !SwitchFilePath.StartsWith("sdmc:/"))) { string SwitchPath = $"sdmc:/switch/{Name}{Homebrew.TemporaryNroSuffix}"; - string TempPath = Device.VFs.SwitchPathToSystemPath(SwitchPath); + string TempPath = Device.FileSystem.SwitchPathToSystemPath(SwitchPath); string SwitchDir = Path.GetDirectoryName(TempPath); diff --git a/Ryujinx.HLE/HOS/Process.cs b/Ryujinx.HLE/HOS/Process.cs index b7ae914f70..ab7279e75e 100644 --- a/Ryujinx.HLE/HOS/Process.cs +++ b/Ryujinx.HLE/HOS/Process.cs @@ -167,7 +167,7 @@ namespace Ryujinx.HLE.HOS MemoryState.MappedMemory, MemoryPermission.ReadAndWrite); - string SwitchPath = Device.VFs.SystemPathToSwitchPath(Executables[0].FilePath); + string SwitchPath = Device.FileSystem.SystemPathToSwitchPath(Executables[0].FilePath); Homebrew.WriteHbAbiData(Memory, HbAbiDataPosition, Handle, SwitchPath); diff --git a/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystem.cs b/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystem.cs index 0a3c8bb0f3..b77043bddb 100644 --- a/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystem.cs +++ b/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystem.cs @@ -51,7 +51,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv long Mode = Context.RequestData.ReadInt64(); int Size = Context.RequestData.ReadInt32(); - string FileName = Context.Device.VFs.GetFullPath(Path, Name); + string FileName = Context.Device.FileSystem.GetFullPath(Path, Name); if (FileName == null) { @@ -80,7 +80,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv { string Name = ReadUtf8String(Context); - string FileName = Context.Device.VFs.GetFullPath(Path, Name); + string FileName = Context.Device.FileSystem.GetFullPath(Path, Name); if (!File.Exists(FileName)) { @@ -101,7 +101,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv { string Name = ReadUtf8String(Context); - string DirName = Context.Device.VFs.GetFullPath(Path, Name); + string DirName = Context.Device.FileSystem.GetFullPath(Path, Name); if (DirName == null) { @@ -137,7 +137,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv { string Name = ReadUtf8String(Context); - string DirName = Context.Device.VFs.GetFullPath(Path, Name); + string DirName = Context.Device.FileSystem.GetFullPath(Path, Name); if (!Directory.Exists(DirName)) { @@ -159,8 +159,8 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv string OldName = ReadUtf8String(Context, 0); string NewName = ReadUtf8String(Context, 1); - string OldFileName = Context.Device.VFs.GetFullPath(Path, OldName); - string NewFileName = Context.Device.VFs.GetFullPath(Path, NewName); + string OldFileName = Context.Device.FileSystem.GetFullPath(Path, OldName); + string NewFileName = Context.Device.FileSystem.GetFullPath(Path, NewName); if (!File.Exists(OldFileName)) { @@ -187,8 +187,8 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv string OldName = ReadUtf8String(Context, 0); string NewName = ReadUtf8String(Context, 1); - string OldDirName = Context.Device.VFs.GetFullPath(Path, OldName); - string NewDirName = Context.Device.VFs.GetFullPath(Path, NewName); + string OldDirName = Context.Device.FileSystem.GetFullPath(Path, OldName); + string NewDirName = Context.Device.FileSystem.GetFullPath(Path, NewName); if (!Directory.Exists(OldDirName)) { @@ -214,7 +214,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv { string Name = ReadUtf8String(Context); - string FileName = Context.Device.VFs.GetFullPath(Path, Name); + string FileName = Context.Device.FileSystem.GetFullPath(Path, Name); if (File.Exists(FileName)) { @@ -240,7 +240,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv string Name = ReadUtf8String(Context); - string FileName = Context.Device.VFs.GetFullPath(Path, Name); + string FileName = Context.Device.FileSystem.GetFullPath(Path, Name); if (!File.Exists(FileName)) { @@ -274,7 +274,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv string Name = ReadUtf8String(Context); - string DirName = Context.Device.VFs.GetFullPath(Path, Name); + string DirName = Context.Device.FileSystem.GetFullPath(Path, Name); if (!Directory.Exists(DirName)) { @@ -309,7 +309,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv { string Name = ReadUtf8String(Context); - Context.ResponseData.Write(Context.Device.VFs.GetDrive().AvailableFreeSpace); + Context.ResponseData.Write(Context.Device.FileSystem.GetDrive().AvailableFreeSpace); return 0; } @@ -318,7 +318,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv { string Name = ReadUtf8String(Context); - Context.ResponseData.Write(Context.Device.VFs.GetDrive().TotalSize); + Context.ResponseData.Write(Context.Device.FileSystem.GetDrive().TotalSize); return 0; } @@ -327,7 +327,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv { string Name = ReadUtf8String(Context); - string DirName = Context.Device.VFs.GetFullPath(Path, Name); + string DirName = Context.Device.FileSystem.GetFullPath(Path, Name); if (!Directory.Exists(DirName)) { diff --git a/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystemProxy.cs b/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystemProxy.cs index 1519c7f4ef..14edcc759e 100644 --- a/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystemProxy.cs +++ b/Ryujinx.HLE/HOS/Services/FspSrv/IFileSystemProxy.cs @@ -31,7 +31,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv public long OpenSdCardFileSystem(ServiceCtx Context) { - MakeObject(Context, new IFileSystem(Context.Device.VFs.GetSdCardPath())); + MakeObject(Context, new IFileSystem(Context.Device.FileSystem.GetSdCardPath())); return 0; } @@ -45,21 +45,21 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv public long OpenSaveDataFileSystem(ServiceCtx Context) { - MakeObject(Context, new IFileSystem(Context.Device.VFs.GetGameSavesPath())); + MakeObject(Context, new IFileSystem(Context.Device.FileSystem.GetGameSavesPath())); return 0; } public long OpenDataStorageByCurrentProcess(ServiceCtx Context) { - MakeObject(Context, new IStorage(Context.Device.VFs.RomFs)); + MakeObject(Context, new IStorage(Context.Device.FileSystem.RomFs)); return 0; } public long OpenPatchDataStorageByCurrentProcess(ServiceCtx Context) { - MakeObject(Context, new IStorage(Context.Device.VFs.RomFs)); + MakeObject(Context, new IStorage(Context.Device.FileSystem.RomFs)); return 0; } diff --git a/Ryujinx.HLE/Switch.cs b/Ryujinx.HLE/Switch.cs index 3154080cda..03dc44e851 100644 --- a/Ryujinx.HLE/Switch.cs +++ b/Ryujinx.HLE/Switch.cs @@ -19,7 +19,7 @@ namespace Ryujinx.HLE internal NvGpu Gpu { get; private set; } - internal VirtualFileSystem VFs { get; private set; } + internal VirtualFileSystem FileSystem { get; private set; } public Horizon System { get; private set; } @@ -47,7 +47,7 @@ namespace Ryujinx.HLE Gpu = new NvGpu(Renderer); - VFs = new VirtualFileSystem(); + FileSystem = new VirtualFileSystem(); System = new Horizon(this); @@ -78,7 +78,7 @@ namespace Ryujinx.HLE internal void Unload() { - VFs.Dispose(); + FileSystem.Dispose(); Memory.Dispose(); }