Alignment and spacing

This commit is contained in:
Alex Barney 2019-10-16 11:58:21 -05:00
commit 1ed524dabc
5 changed files with 15 additions and 9 deletions

View file

@ -235,14 +235,15 @@ namespace Ryujinx.HLE.HOS
TimeServiceManager.Instance.SetupEphemeralNetworkSystemClock(); TimeServiceManager.Instance.SetupEphemeralNetworkSystemClock();
LocalFileSystem baseFs = new LocalFileSystem(device.FileSystem.GetBasePath()); LocalFileSystem serverBaseFs = new LocalFileSystem(device.FileSystem.GetBasePath());
DefaultFsServerObjects fsServerObjects = DefaultFsServerObjects.GetDefaultEmulatedCreators(baseFs, KeySet);
DefaultFsServerObjects fsServerObjects = DefaultFsServerObjects.GetDefaultEmulatedCreators(serverBaseFs, KeySet);
GameCard = fsServerObjects.GameCard; GameCard = fsServerObjects.GameCard;
FileSystemServerConfig fsServerConfig = new FileSystemServerConfig FileSystemServerConfig fsServerConfig = new FileSystemServerConfig
{ {
FsCreators = fsServerObjects.FsCreators, FsCreators = fsServerObjects.FsCreators,
DeviceOperator = fsServerObjects.DeviceOperator, DeviceOperator = fsServerObjects.DeviceOperator,
ExternalKeySet = KeySet.ExternalKeySet ExternalKeySet = KeySet.ExternalKeySet
}; };

View file

@ -21,8 +21,8 @@ namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy
long bufferPosition = context.Request.ReceiveBuff[0].Position; long bufferPosition = context.Request.ReceiveBuff[0].Position;
long bufferLen = context.Request.ReceiveBuff[0].Size; long bufferLen = context.Request.ReceiveBuff[0].Size;
byte[] entriesBytes = new byte[bufferLen]; byte[] entriesBytes = new byte[bufferLen];
Span<DirectoryEntry> entries = MemoryMarshal.Cast<byte, DirectoryEntry>(entriesBytes); Span<DirectoryEntry> entries = MemoryMarshal.Cast<byte, DirectoryEntry>(entriesBytes);
Result result = _baseDirectory.Read(out long entriesRead, entries); Result result = _baseDirectory.Read(out long entriesRead, entries);

View file

@ -136,8 +136,8 @@ namespace Ryujinx.HLE.HOS.Services.Fs
// OpenGameCardStorage(u32, u32) -> object<nn::fssrv::sf::IStorage> // OpenGameCardStorage(u32, u32) -> object<nn::fssrv::sf::IStorage>
public ResultCode OpenGameCardStorage(ServiceCtx context) public ResultCode OpenGameCardStorage(ServiceCtx context)
{ {
GameCardHandle handle = new GameCardHandle(context.RequestData.ReadInt32()); GameCardHandle handle = new GameCardHandle(context.RequestData.ReadInt32());
GameCardPartitionRaw partitionId = (GameCardPartitionRaw) context.RequestData.ReadInt32(); GameCardPartitionRaw partitionId = (GameCardPartitionRaw)context.RequestData.ReadInt32();
Result result = _baseFileSystemProxy.OpenGameCardStorage(out LibHac.Fs.IStorage storage, handle, partitionId); Result result = _baseFileSystemProxy.OpenGameCardStorage(out LibHac.Fs.IStorage storage, handle, partitionId);
if (result.IsFailure()) return (ResultCode)result.Value; if (result.IsFailure()) return (ResultCode)result.Value;

View file

@ -1,4 +1,5 @@
using LibHac.Fs; using LibHac;
using LibHac.Fs;
using LibHac.FsSystem; using LibHac.FsSystem;
using LibHac.FsSystem.NcaUtils; using LibHac.FsSystem.NcaUtils;
using Ryujinx.Common.Logging; using Ryujinx.Common.Logging;
@ -8,7 +9,7 @@ using Ryujinx.HLE.Resource;
using Ryujinx.HLE.Utilities; using Ryujinx.HLE.Utilities;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using LibHac;
using static Ryujinx.HLE.HOS.Services.Time.TimeZone.TimeZoneRule; using static Ryujinx.HLE.HOS.Services.Time.TimeZone.TimeZoneRule;
namespace Ryujinx.HLE.HOS.Services.Time.TimeZone namespace Ryujinx.HLE.HOS.Services.Time.TimeZone

View file

@ -154,6 +154,7 @@ namespace Ryujinx.UI
try try
{ {
controlFs.OpenFile(out IFile icon, $"/icon_{DesiredTitleLanguage}.dat", OpenMode.Read).ThrowIfFailure(); controlFs.OpenFile(out IFile icon, $"/icon_{DesiredTitleLanguage}.dat", OpenMode.Read).ThrowIfFailure();
using (MemoryStream stream = new MemoryStream()) using (MemoryStream stream = new MemoryStream())
{ {
icon.AsStream().CopyTo(stream); icon.AsStream().CopyTo(stream);
@ -170,6 +171,7 @@ namespace Ryujinx.UI
} }
controlFs.OpenFile(out IFile icon, entry.FullPath, OpenMode.Read).ThrowIfFailure(); controlFs.OpenFile(out IFile icon, entry.FullPath, OpenMode.Read).ThrowIfFailure();
using (MemoryStream stream = new MemoryStream()) using (MemoryStream stream = new MemoryStream())
{ {
icon.AsStream().CopyTo(stream); icon.AsStream().CopyTo(stream);
@ -362,7 +364,9 @@ namespace Ryujinx.UI
foreach (DirectoryEntryEx fileEntry in Pfs.EnumerateEntries("/", "*.nca")) foreach (DirectoryEntryEx fileEntry in Pfs.EnumerateEntries("/", "*.nca"))
{ {
Pfs.OpenFile(out IFile ncaFile, fileEntry.FullPath, OpenMode.Read).ThrowIfFailure(); Pfs.OpenFile(out IFile ncaFile, fileEntry.FullPath, OpenMode.Read).ThrowIfFailure();
Nca nca = new Nca(KeySet, ncaFile.AsStorage()); Nca nca = new Nca(KeySet, ncaFile.AsStorage());
if (nca.Header.ContentType == NcaContentType.Control) if (nca.Header.ContentType == NcaContentType.Control)
{ {
controlNca = nca; controlNca = nca;