yasf(yet another style fix) plus symbols
This commit is contained in:
parent
1876a667ce
commit
79132ddfb0
12 changed files with 101 additions and 49 deletions
|
@ -174,8 +174,6 @@ namespace Ryujinx.HLE.FileSystem
|
||||||
|
|
||||||
public long OpenDirectory(string Name, int FilterFlags, out IDirectory DirectoryInterface)
|
public long OpenDirectory(string Name, int FilterFlags, out IDirectory DirectoryInterface)
|
||||||
{
|
{
|
||||||
DirectoryInterface = null;
|
|
||||||
|
|
||||||
if (Directory.Exists(Name))
|
if (Directory.Exists(Name))
|
||||||
{
|
{
|
||||||
DirectoryInterface = new IDirectory(Name, FilterFlags, this);
|
DirectoryInterface = new IDirectory(Name, FilterFlags, this);
|
||||||
|
@ -183,13 +181,13 @@ namespace Ryujinx.HLE.FileSystem
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DirectoryInterface = null;
|
||||||
|
|
||||||
return MakeError(ErrorModule.Fs, FsErr.PathDoesNotExist);
|
return MakeError(ErrorModule.Fs, FsErr.PathDoesNotExist);
|
||||||
}
|
}
|
||||||
|
|
||||||
public long OpenFile(string Name, out IFile FileInterface)
|
public long OpenFile(string Name, out IFile FileInterface)
|
||||||
{
|
{
|
||||||
FileInterface = null;
|
|
||||||
|
|
||||||
if (File.Exists(Name))
|
if (File.Exists(Name))
|
||||||
{
|
{
|
||||||
FileStream Stream = new FileStream(Name, FileMode.Open);
|
FileStream Stream = new FileStream(Name, FileMode.Open);
|
||||||
|
@ -199,6 +197,8 @@ namespace Ryujinx.HLE.FileSystem
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FileInterface = null;
|
||||||
|
|
||||||
return MakeError(ErrorModule.Fs, FsErr.PathDoesNotExist);
|
return MakeError(ErrorModule.Fs, FsErr.PathDoesNotExist);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -113,19 +113,18 @@ namespace Ryujinx.HLE.FileSystem
|
||||||
|
|
||||||
public long OpenFile(string Name, out IFile FileInterface)
|
public long OpenFile(string Name, out IFile FileInterface)
|
||||||
{
|
{
|
||||||
FileInterface = null;
|
|
||||||
|
|
||||||
Name = Name.TrimStart('/');
|
Name = Name.TrimStart('/');
|
||||||
|
|
||||||
if (Pfs.FileExists(Name))
|
if (Pfs.FileExists(Name))
|
||||||
{
|
{
|
||||||
Stream Stream = Pfs.OpenFile(Name);
|
Stream Stream = Pfs.OpenFile(Name);
|
||||||
|
|
||||||
FileInterface = new IFile(Stream, Name);
|
FileInterface = new IFile(Stream, Name);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FileInterface = null;
|
||||||
|
|
||||||
return MakeError(ErrorModule.Fs, FsErr.PathDoesNotExist);
|
return MakeError(ErrorModule.Fs, FsErr.PathDoesNotExist);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -115,8 +115,6 @@ namespace Ryujinx.HLE.FileSystem
|
||||||
|
|
||||||
public long OpenDirectory(string Name, int FilterFlags, out IDirectory DirectoryInterface)
|
public long OpenDirectory(string Name, int FilterFlags, out IDirectory DirectoryInterface)
|
||||||
{
|
{
|
||||||
DirectoryInterface = null;
|
|
||||||
|
|
||||||
RomfsDir Directory = RomFs.Directories.Find(x => x.Name == Name);
|
RomfsDir Directory = RomFs.Directories.Find(x => x.Name == Name);
|
||||||
|
|
||||||
if (Directory != null)
|
if (Directory != null)
|
||||||
|
@ -126,13 +124,13 @@ namespace Ryujinx.HLE.FileSystem
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DirectoryInterface = null;
|
||||||
|
|
||||||
return MakeError(ErrorModule.Fs, FsErr.PathDoesNotExist);
|
return MakeError(ErrorModule.Fs, FsErr.PathDoesNotExist);
|
||||||
}
|
}
|
||||||
|
|
||||||
public long OpenFile(string Name, out IFile FileInterface)
|
public long OpenFile(string Name, out IFile FileInterface)
|
||||||
{
|
{
|
||||||
FileInterface = null;
|
|
||||||
|
|
||||||
if (RomFs.FileExists(Name))
|
if (RomFs.FileExists(Name))
|
||||||
{
|
{
|
||||||
Stream Stream = RomFs.OpenFile(Name);
|
Stream Stream = RomFs.OpenFile(Name);
|
||||||
|
@ -142,6 +140,8 @@ namespace Ryujinx.HLE.FileSystem
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FileInterface = null;
|
||||||
|
|
||||||
return MakeError(ErrorModule.Fs, FsErr.PathDoesNotExist);
|
return MakeError(ErrorModule.Fs, FsErr.PathDoesNotExist);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,6 @@ namespace Ryujinx.HLE.HOS.Font
|
||||||
}
|
}
|
||||||
|
|
||||||
NcaFileStream.Dispose();
|
NcaFileStream.Dispose();
|
||||||
|
|
||||||
Nca.Dispose();
|
Nca.Dispose();
|
||||||
|
|
||||||
return Info;
|
return Info;
|
||||||
|
|
|
@ -51,6 +51,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
CurrentItemIndex = 0;
|
CurrentItemIndex = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Read() -> (u64 count, buffer<nn::fssrv::sf::IDirectoryEntry, 6, 0> entries)
|
||||||
public long Read(ServiceCtx Context)
|
public long Read(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
long BufferPosition = Context.Request.ReceiveBuff[0].Position;
|
long BufferPosition = Context.Request.ReceiveBuff[0].Position;
|
||||||
|
@ -88,6 +89,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
Context.Memory.WriteInt64(Position + 0x308, Entry.Size);
|
Context.Memory.WriteInt64(Position + 0x308, Entry.Size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetEntryCount() -> u64
|
||||||
public long GetEntryCount(ServiceCtx Context)
|
public long GetEntryCount(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
Context.ResponseData.Write((long)DirectoryEntries.Count);
|
Context.ResponseData.Write((long)DirectoryEntries.Count);
|
||||||
|
|
|
@ -32,6 +32,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
this.HostPath = HostPath;
|
this.HostPath = HostPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Read(u32, u64 offset, u64 size) -> (u64 out_size, buffer<u8, 0x46, 0> out_buf)
|
||||||
public long Read(ServiceCtx Context)
|
public long Read(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
long Position = Context.Request.ReceiveBuff[0].Position;
|
long Position = Context.Request.ReceiveBuff[0].Position;
|
||||||
|
@ -53,6 +54,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Write(u32, u64 offset, u64 size, buffer<u8, 0x45, 0>)
|
||||||
public long Write(ServiceCtx Context)
|
public long Write(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
long Position = Context.Request.SendBuff[0].Position;
|
long Position = Context.Request.SendBuff[0].Position;
|
||||||
|
@ -69,6 +71,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Flush()
|
||||||
public long Flush(ServiceCtx Context)
|
public long Flush(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
BaseStream.Flush();
|
BaseStream.Flush();
|
||||||
|
@ -76,6 +79,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetSize(u64 size)
|
||||||
public long SetSize(ServiceCtx Context)
|
public long SetSize(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
long Size = Context.RequestData.ReadInt64();
|
long Size = Context.RequestData.ReadInt64();
|
||||||
|
@ -85,6 +89,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetSize() -> u64 fileSize
|
||||||
public long GetSize(ServiceCtx Context)
|
public long GetSize(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
Context.ResponseData.Write(BaseStream.Length);
|
Context.ResponseData.Write(BaseStream.Length);
|
||||||
|
|
|
@ -48,6 +48,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
this.Provider = Provider;
|
this.Provider = Provider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CreateFile(u32 mode, u64 size, buffer<bytes<0x301>, 0x19, 0x301> path)
|
||||||
public long CreateFile(ServiceCtx Context)
|
public long CreateFile(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
string Name = ReadUtf8String(Context);
|
string Name = ReadUtf8String(Context);
|
||||||
|
@ -75,6 +76,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
return Provider.CreateFile(FileName, Size);
|
return Provider.CreateFile(FileName, Size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DeleteFile(buffer<bytes<0x301>, 0x19, 0x301> path)
|
||||||
public long DeleteFile(ServiceCtx Context)
|
public long DeleteFile(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
string Name = ReadUtf8String(Context);
|
string Name = ReadUtf8String(Context);
|
||||||
|
@ -94,6 +96,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
return Provider.DeleteFile(FileName);
|
return Provider.DeleteFile(FileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CreateDirectory(buffer<bytes<0x301>, 0x19, 0x301> path)
|
||||||
public long CreateDirectory(ServiceCtx Context)
|
public long CreateDirectory(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
string Name = ReadUtf8String(Context);
|
string Name = ReadUtf8String(Context);
|
||||||
|
@ -120,11 +123,13 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DeleteDirectory(buffer<bytes<0x301>, 0x19, 0x301> path)
|
||||||
public long DeleteDirectory(ServiceCtx Context)
|
public long DeleteDirectory(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
return DeleteDirectory(Context, false);
|
return DeleteDirectory(Context, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DeleteDirectoryRecursively(buffer<bytes<0x301>, 0x19, 0x301> path)
|
||||||
public long DeleteDirectoryRecursively(ServiceCtx Context)
|
public long DeleteDirectoryRecursively(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
return DeleteDirectory(Context, true);
|
return DeleteDirectory(Context, true);
|
||||||
|
@ -151,6 +156,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RenameFile(buffer<bytes<0x301>, 0x19, 0x301> oldPath, buffer<bytes<0x301>, 0x19, 0x301> newPath)
|
||||||
public long RenameFile(ServiceCtx Context)
|
public long RenameFile(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
string OldName = ReadUtf8String(Context, 0);
|
string OldName = ReadUtf8String(Context, 0);
|
||||||
|
@ -177,6 +183,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
return Provider.RenameFile(OldFileName, NewFileName);
|
return Provider.RenameFile(OldFileName, NewFileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RenameDirectory(buffer<bytes<0x301>, 0x19, 0x301> oldPath, buffer<bytes<0x301>, 0x19, 0x301> newPath)
|
||||||
public long RenameDirectory(ServiceCtx Context)
|
public long RenameDirectory(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
string OldName = ReadUtf8String(Context, 0);
|
string OldName = ReadUtf8String(Context, 0);
|
||||||
|
@ -203,6 +210,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
return Provider.RenameDirectory(OldDirName, NewDirName);
|
return Provider.RenameDirectory(OldDirName, NewDirName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetEntryType(buffer<bytes<0x301>, 0x19, 0x301> path) -> nn::fssrv::sf::DirectoryEntryType
|
||||||
public long GetEntryType(ServiceCtx Context)
|
public long GetEntryType(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
string Name = ReadUtf8String(Context);
|
string Name = ReadUtf8String(Context);
|
||||||
|
@ -227,6 +235,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OpenFile(u32 mode, buffer<bytes<0x301>, 0x19, 0x301> path) -> object<nn::fssrv::sf::IFile> file
|
||||||
public long OpenFile(ServiceCtx Context)
|
public long OpenFile(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
int FilterFlags = Context.RequestData.ReadInt32();
|
int FilterFlags = Context.RequestData.ReadInt32();
|
||||||
|
@ -265,6 +274,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
return Error;
|
return Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OpenDirectory(u32 filter_flags, buffer<bytes<0x301>, 0x19, 0x301> path) -> object<nn::fssrv::sf::IDirectory> directory
|
||||||
public long OpenDirectory(ServiceCtx Context)
|
public long OpenDirectory(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
int FilterFlags = Context.RequestData.ReadInt32();
|
int FilterFlags = Context.RequestData.ReadInt32();
|
||||||
|
@ -300,11 +310,13 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
return Error;
|
return Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Commit()
|
||||||
public long Commit(ServiceCtx Context)
|
public long Commit(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetFreeSpaceSize(buffer<bytes<0x301>, 0x19, 0x301> path) -> u64 totalFreeSpace
|
||||||
public long GetFreeSpaceSize(ServiceCtx Context)
|
public long GetFreeSpaceSize(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
string Name = ReadUtf8String(Context);
|
string Name = ReadUtf8String(Context);
|
||||||
|
@ -314,6 +326,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetTotalSpaceSize(buffer<bytes<0x301>, 0x19, 0x301> path) -> u64 totalSize
|
||||||
public long GetTotalSpaceSize(ServiceCtx Context)
|
public long GetTotalSpaceSize(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
string Name = ReadUtf8String(Context);
|
string Name = ReadUtf8String(Context);
|
||||||
|
@ -323,6 +336,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CleanDirectoryRecursively(buffer<bytes<0x301>, 0x19, 0x301> path)
|
||||||
public long CleanDirectoryRecursively(ServiceCtx Context)
|
public long CleanDirectoryRecursively(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
string Name = ReadUtf8String(Context);
|
string Name = ReadUtf8String(Context);
|
||||||
|
|
|
@ -22,7 +22,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
{
|
{
|
||||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||||
{
|
{
|
||||||
{ 1, SetCurrentProcess },
|
{ 1, Initialize },
|
||||||
{ 8, OpenFileSystemWithId },
|
{ 8, OpenFileSystemWithId },
|
||||||
{ 11, OpenBisFileSystem },
|
{ 11, OpenBisFileSystem },
|
||||||
{ 18, OpenSdCardFileSystem },
|
{ 18, OpenSdCardFileSystem },
|
||||||
|
@ -35,42 +35,14 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public long SetCurrentProcess(ServiceCtx Context)
|
// Initialize(u64, pid)
|
||||||
|
public long Initialize(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long OpenBisFileSystem(ServiceCtx Context)
|
// OpenFileSystemWithId(nn::fssrv::sf::FileSystemType filesystem_type, nn::ApplicationId tid, buffer<bytes<0x301>, 0x19, 0x301> path)
|
||||||
{
|
// -> object<nn::fssrv::sf::IFileSystem> contentFs
|
||||||
int BisPartitionId = Context.RequestData.ReadInt32();
|
|
||||||
string PartitionString = ReadUtf8String(Context);
|
|
||||||
string BisPartitonPath = string.Empty;
|
|
||||||
|
|
||||||
switch (BisPartitionId)
|
|
||||||
{
|
|
||||||
case 29:
|
|
||||||
BisPartitonPath = SafeNandPath;
|
|
||||||
break;
|
|
||||||
case 30:
|
|
||||||
case 31:
|
|
||||||
BisPartitonPath = SystemNandPath;
|
|
||||||
break;
|
|
||||||
case 32:
|
|
||||||
BisPartitonPath = UserNandPath;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return MakeError(ErrorModule.Fs, FsErr.InvalidInput);
|
|
||||||
}
|
|
||||||
|
|
||||||
string FullPath = Context.Device.FileSystem.GetFullPartitionPath(BisPartitonPath);
|
|
||||||
|
|
||||||
FileSystemProvider FileSystemProvider = new FileSystemProvider(FullPath, Context.Device.FileSystem.GetBasePath());
|
|
||||||
|
|
||||||
MakeObject(Context, new IFileSystem(FullPath, FileSystemProvider));
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public long OpenFileSystemWithId(ServiceCtx Context)
|
public long OpenFileSystemWithId(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
FileSystemType FileSystemType = (FileSystemType)Context.RequestData.ReadInt32();
|
FileSystemType FileSystemType = (FileSystemType)Context.RequestData.ReadInt32();
|
||||||
|
@ -103,6 +75,39 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
return MakeError(ErrorModule.Fs, FsErr.InvalidInput);
|
return MakeError(ErrorModule.Fs, FsErr.InvalidInput);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OpenBisFileSystem(nn::fssrv::sf::Partition partitionID, buffer<bytes<0x301>, 0x19, 0x301>) -> object<nn::fssrv::sf::IFileSystem> Bis
|
||||||
|
public long OpenBisFileSystem(ServiceCtx Context)
|
||||||
|
{
|
||||||
|
int BisPartitionId = Context.RequestData.ReadInt32();
|
||||||
|
string PartitionString = ReadUtf8String(Context);
|
||||||
|
string BisPartitonPath = string.Empty;
|
||||||
|
|
||||||
|
switch (BisPartitionId)
|
||||||
|
{
|
||||||
|
case 29:
|
||||||
|
BisPartitonPath = SafeNandPath;
|
||||||
|
break;
|
||||||
|
case 30:
|
||||||
|
case 31:
|
||||||
|
BisPartitonPath = SystemNandPath;
|
||||||
|
break;
|
||||||
|
case 32:
|
||||||
|
BisPartitonPath = UserNandPath;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return MakeError(ErrorModule.Fs, FsErr.InvalidInput);
|
||||||
|
}
|
||||||
|
|
||||||
|
string FullPath = Context.Device.FileSystem.GetFullPartitionPath(BisPartitonPath);
|
||||||
|
|
||||||
|
FileSystemProvider FileSystemProvider = new FileSystemProvider(FullPath, Context.Device.FileSystem.GetBasePath());
|
||||||
|
|
||||||
|
MakeObject(Context, new IFileSystem(FullPath, FileSystemProvider));
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// OpenSdCardFileSystem() -> object<nn::fssrv::sf::IFileSystem>
|
||||||
public long OpenSdCardFileSystem(ServiceCtx Context)
|
public long OpenSdCardFileSystem(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
string SdCardPath = Context.Device.FileSystem.GetSdCardPath();
|
string SdCardPath = Context.Device.FileSystem.GetSdCardPath();
|
||||||
|
@ -114,6 +119,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OpenSaveDataFileSystem(u8 save_data_space_id, nn::fssrv::sf::SaveStruct saveStruct) -> object<nn::fssrv::sf::IFileSystem> saveDataFs
|
||||||
public long OpenSaveDataFileSystem(ServiceCtx Context)
|
public long OpenSaveDataFileSystem(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
LoadSaveDataFileSystem(Context);
|
LoadSaveDataFileSystem(Context);
|
||||||
|
@ -121,6 +127,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OpenSaveDataFileSystemBySystemSaveDataId(u8 save_data_space_id, nn::fssrv::sf::SaveStruct saveStruct) -> object<nn::fssrv::sf::IFileSystem> systemSaveDataFs
|
||||||
public long OpenSaveDataFileSystemBySystemSaveDataId(ServiceCtx Context)
|
public long OpenSaveDataFileSystemBySystemSaveDataId(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
LoadSaveDataFileSystem(Context);
|
LoadSaveDataFileSystem(Context);
|
||||||
|
@ -128,6 +135,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OpenDataStorageByCurrentProcess() -> object<nn::fssrv::sf::IStorage> dataStorage
|
||||||
public long OpenDataStorageByCurrentProcess(ServiceCtx Context)
|
public long OpenDataStorageByCurrentProcess(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
MakeObject(Context, new IStorage(Context.Device.FileSystem.RomFs));
|
MakeObject(Context, new IStorage(Context.Device.FileSystem.RomFs));
|
||||||
|
@ -135,6 +143,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OpenDataStorageByDataId(u8 storageId, nn::ApplicationId tid) -> object<nn::fssrv::sf::IStorage> dataStorage
|
||||||
public long OpenDataStorageByDataId(ServiceCtx Context)
|
public long OpenDataStorageByDataId(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
StorageId StorageId = (StorageId)Context.RequestData.ReadByte();
|
StorageId StorageId = (StorageId)Context.RequestData.ReadByte();
|
||||||
|
@ -190,6 +199,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
throw new FileNotFoundException($"System archive with titleid {TitleId:x16} was not found on Storage {StorageId}. Found in {InstalledStorage}.");
|
throw new FileNotFoundException($"System archive with titleid {TitleId:x16} was not found on Storage {StorageId}. Found in {InstalledStorage}.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OpenPatchDataStorageByCurrentProcess() -> object<nn::fssrv::sf::IStorage>
|
||||||
public long OpenPatchDataStorageByCurrentProcess(ServiceCtx Context)
|
public long OpenPatchDataStorageByCurrentProcess(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
MakeObject(Context, new IStorage(Context.Device.FileSystem.RomFs));
|
MakeObject(Context, new IStorage(Context.Device.FileSystem.RomFs));
|
||||||
|
@ -197,6 +207,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetGlobalAccessLogMode() -> u32 logMode
|
||||||
public long GetGlobalAccessLogMode(ServiceCtx Context)
|
public long GetGlobalAccessLogMode(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
Context.ResponseData.Write(0);
|
Context.ResponseData.Write(0);
|
||||||
|
|
|
@ -22,6 +22,7 @@ namespace Ryujinx.HLE.HOS.Services.FspSrv
|
||||||
this.BaseStream = BaseStream;
|
this.BaseStream = BaseStream;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Read(u64 offset, u64 length) -> buffer<u8, 0x46, 0> buffer
|
||||||
public long Read(ServiceCtx Context)
|
public long Read(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
long Offset = Context.RequestData.ReadInt64();
|
long Offset = Context.RequestData.ReadInt64();
|
||||||
|
|
|
@ -43,6 +43,7 @@ namespace Ryujinx.HLE.HOS.Services.Lr
|
||||||
this.StorageId = StorageId;
|
this.StorageId = StorageId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DeleteInfoHtmlNcaPath()
|
||||||
public long DeleteInfoHtmlNcaPath(ServiceCtx Context)
|
public long DeleteInfoHtmlNcaPath(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
long TitleId = Context.RequestData.ReadInt64();
|
long TitleId = Context.RequestData.ReadInt64();
|
||||||
|
@ -52,6 +53,7 @@ namespace Ryujinx.HLE.HOS.Services.Lr
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DeleteDocHtmlNcaPath()
|
||||||
public long DeleteDocHtmlNcaPath(ServiceCtx Context)
|
public long DeleteDocHtmlNcaPath(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
long TitleId = Context.RequestData.ReadInt64();
|
long TitleId = Context.RequestData.ReadInt64();
|
||||||
|
@ -61,6 +63,7 @@ namespace Ryujinx.HLE.HOS.Services.Lr
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DeleteControlNcaPath()
|
||||||
public long DeleteControlNcaPath(ServiceCtx Context)
|
public long DeleteControlNcaPath(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
long TitleId = Context.RequestData.ReadInt64();
|
long TitleId = Context.RequestData.ReadInt64();
|
||||||
|
@ -70,6 +73,7 @@ namespace Ryujinx.HLE.HOS.Services.Lr
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DeleteProgramNcaPath()
|
||||||
public long DeleteProgramNcaPath(ServiceCtx Context)
|
public long DeleteProgramNcaPath(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
long TitleId = Context.RequestData.ReadInt64();
|
long TitleId = Context.RequestData.ReadInt64();
|
||||||
|
@ -79,6 +83,7 @@ namespace Ryujinx.HLE.HOS.Services.Lr
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ClearLocationResolver2()
|
||||||
public long ClearLocationResolver2(ServiceCtx Context)
|
public long ClearLocationResolver2(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
Context.Device.System.ContentManager.RefreshEntries(StorageId, 1);
|
Context.Device.System.ContentManager.RefreshEntries(StorageId, 1);
|
||||||
|
@ -86,6 +91,7 @@ namespace Ryujinx.HLE.HOS.Services.Lr
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetProgramNcaPath2()
|
||||||
public long SetProgramNcaPath2(ServiceCtx Context)
|
public long SetProgramNcaPath2(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
long TitleId = Context.RequestData.ReadInt64();
|
long TitleId = Context.RequestData.ReadInt64();
|
||||||
|
@ -95,6 +101,7 @@ namespace Ryujinx.HLE.HOS.Services.Lr
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RedirectApplicationControlPath()
|
||||||
public long RedirectApplicationControlPath(ServiceCtx Context)
|
public long RedirectApplicationControlPath(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
long TitleId = Context.RequestData.ReadInt64();
|
long TitleId = Context.RequestData.ReadInt64();
|
||||||
|
@ -104,6 +111,7 @@ namespace Ryujinx.HLE.HOS.Services.Lr
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RedirectApplicationHtmlDocumentPath()
|
||||||
public long RedirectApplicationHtmlDocumentPath(ServiceCtx Context)
|
public long RedirectApplicationHtmlDocumentPath(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
long TitleId = Context.RequestData.ReadInt64();
|
long TitleId = Context.RequestData.ReadInt64();
|
||||||
|
@ -113,6 +121,7 @@ namespace Ryujinx.HLE.HOS.Services.Lr
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RedirectApplicationLegalInformationPath()
|
||||||
public long RedirectApplicationLegalInformationPath(ServiceCtx Context)
|
public long RedirectApplicationLegalInformationPath(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
long TitleId = Context.RequestData.ReadInt64();
|
long TitleId = Context.RequestData.ReadInt64();
|
||||||
|
@ -122,6 +131,7 @@ namespace Ryujinx.HLE.HOS.Services.Lr
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ResolveDataPath()
|
||||||
public long ResolveDataPath(ServiceCtx Context)
|
public long ResolveDataPath(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
long TitleId = Context.RequestData.ReadInt64();
|
long TitleId = Context.RequestData.ReadInt64();
|
||||||
|
@ -136,6 +146,7 @@ namespace Ryujinx.HLE.HOS.Services.Lr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ResolveApplicationHtmlDocumentPath()
|
||||||
public long ResolveApplicationHtmlDocumentPath(ServiceCtx Context)
|
public long ResolveApplicationHtmlDocumentPath(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
long TitleId = Context.RequestData.ReadInt64();
|
long TitleId = Context.RequestData.ReadInt64();
|
||||||
|
@ -150,6 +161,7 @@ namespace Ryujinx.HLE.HOS.Services.Lr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ResolveApplicationLegalInformationPath()
|
||||||
public long ResolveApplicationLegalInformationPath(ServiceCtx Context)
|
public long ResolveApplicationLegalInformationPath(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
long TitleId = Context.RequestData.ReadInt64();
|
long TitleId = Context.RequestData.ReadInt64();
|
||||||
|
@ -164,6 +176,7 @@ namespace Ryujinx.HLE.HOS.Services.Lr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ResolveApplicationControlPath()
|
||||||
public long ResolveApplicationControlPath(ServiceCtx Context)
|
public long ResolveApplicationControlPath(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
long TitleId = Context.RequestData.ReadInt64();
|
long TitleId = Context.RequestData.ReadInt64();
|
||||||
|
@ -178,6 +191,7 @@ namespace Ryujinx.HLE.HOS.Services.Lr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// RedirectProgramPath()
|
||||||
public long RedirectProgramPath(ServiceCtx Context)
|
public long RedirectProgramPath(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
long TitleId = Context.RequestData.ReadInt64();
|
long TitleId = Context.RequestData.ReadInt64();
|
||||||
|
@ -187,6 +201,7 @@ namespace Ryujinx.HLE.HOS.Services.Lr
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Refresh()
|
||||||
public long Refresh(ServiceCtx Context)
|
public long Refresh(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
Context.Device.System.ContentManager.RefreshEntries(StorageId, 1);
|
Context.Device.System.ContentManager.RefreshEntries(StorageId, 1);
|
||||||
|
@ -194,6 +209,7 @@ namespace Ryujinx.HLE.HOS.Services.Lr
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ResolveProgramPath()
|
||||||
public long ResolveProgramPath(ServiceCtx Context)
|
public long ResolveProgramPath(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
long TitleId = Context.RequestData.ReadInt64();
|
long TitleId = Context.RequestData.ReadInt64();
|
||||||
|
@ -211,7 +227,6 @@ namespace Ryujinx.HLE.HOS.Services.Lr
|
||||||
private void RedirectPath(ServiceCtx Context, long TitleId, int Flag, ContentType ContentType)
|
private void RedirectPath(ServiceCtx Context, long TitleId, int Flag, ContentType ContentType)
|
||||||
{
|
{
|
||||||
string ContentPath = ReadUtf8String(Context);
|
string ContentPath = ReadUtf8String(Context);
|
||||||
|
|
||||||
LocationEntry NewLocation = new LocationEntry(ContentPath, Flag, TitleId, ContentType);
|
LocationEntry NewLocation = new LocationEntry(ContentPath, Flag, TitleId, ContentType);
|
||||||
|
|
||||||
Context.Device.System.ContentManager.RedirectLocation(NewLocation, StorageId);
|
Context.Device.System.ContentManager.RedirectLocation(NewLocation, StorageId);
|
||||||
|
|
|
@ -19,6 +19,7 @@ namespace Ryujinx.HLE.HOS.Services.Lr
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OpenLocationResolver()
|
||||||
private long OpenLocationResolver(ServiceCtx Context)
|
private long OpenLocationResolver(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
StorageId StorageId = (StorageId)Context.RequestData.ReadByte();
|
StorageId StorageId = (StorageId)Context.RequestData.ReadByte();
|
||||||
|
|
|
@ -28,11 +28,13 @@ namespace Ryujinx.HLE.HOS.Services.Set
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetFirmwareVersion() -> buffer<nn::settings::system::FirmwareVersion, 0x1a, 0x100>
|
||||||
public static long GetFirmwareVersion(ServiceCtx Context)
|
public static long GetFirmwareVersion(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
return GetFirmwareVersion2(Context);
|
return GetFirmwareVersion2(Context);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetFirmwareVersion2() -> buffer<nn::settings::system::FirmwareVersion, 0x1a, 0x100>
|
||||||
public static long GetFirmwareVersion2(ServiceCtx Context)
|
public static long GetFirmwareVersion2(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
long ReplyPos = Context.Request.RecvListBuff[0].Position;
|
long ReplyPos = Context.Request.RecvListBuff[0].Position;
|
||||||
|
@ -91,6 +93,7 @@ namespace Ryujinx.HLE.HOS.Services.Set
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetColorSetId() -> i32
|
||||||
public static long GetColorSetId(ServiceCtx Context)
|
public static long GetColorSetId(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
Context.ResponseData.Write((int)Context.Device.System.State.ThemeColor);
|
Context.ResponseData.Write((int)Context.Device.System.State.ThemeColor);
|
||||||
|
@ -98,6 +101,7 @@ namespace Ryujinx.HLE.HOS.Services.Set
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetColorSetId() -> i32
|
||||||
public static long SetColorSetId(ServiceCtx Context)
|
public static long SetColorSetId(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
int ColorSetId = Context.RequestData.ReadInt32();
|
int ColorSetId = Context.RequestData.ReadInt32();
|
||||||
|
@ -107,6 +111,7 @@ namespace Ryujinx.HLE.HOS.Services.Set
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetSettingsItemValue(buffer<nn::settings::SettingsName, 0x19, 0x48>, buffer<nn::settings::SettingsItemKey, 0x19, 0x48>) -> (u64, buffer<unknown, 6, 0>)
|
||||||
public static long GetSettingsItemValue(ServiceCtx Context)
|
public static long GetSettingsItemValue(ServiceCtx Context)
|
||||||
{
|
{
|
||||||
long ClassPos = Context.Request.PtrBuff[0].Position;
|
long ClassPos = Context.Request.PtrBuff[0].Position;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue