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();
LocalFileSystem baseFs = new LocalFileSystem(device.FileSystem.GetBasePath());
DefaultFsServerObjects fsServerObjects = DefaultFsServerObjects.GetDefaultEmulatedCreators(baseFs, KeySet);
LocalFileSystem serverBaseFs = new LocalFileSystem(device.FileSystem.GetBasePath());
DefaultFsServerObjects fsServerObjects = DefaultFsServerObjects.GetDefaultEmulatedCreators(serverBaseFs, KeySet);
GameCard = fsServerObjects.GameCard;
FileSystemServerConfig fsServerConfig = new FileSystemServerConfig
{
FsCreators = fsServerObjects.FsCreators,
FsCreators = fsServerObjects.FsCreators,
DeviceOperator = fsServerObjects.DeviceOperator,
ExternalKeySet = KeySet.ExternalKeySet
};

View file

@ -21,8 +21,8 @@ namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy
long bufferPosition = context.Request.ReceiveBuff[0].Position;
long bufferLen = context.Request.ReceiveBuff[0].Size;
byte[] entriesBytes = new byte[bufferLen];
Span<DirectoryEntry> entries = MemoryMarshal.Cast<byte, DirectoryEntry>(entriesBytes);
byte[] entriesBytes = new byte[bufferLen];
Span<DirectoryEntry> entries = MemoryMarshal.Cast<byte, DirectoryEntry>(entriesBytes);
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>
public ResultCode OpenGameCardStorage(ServiceCtx context)
{
GameCardHandle handle = new GameCardHandle(context.RequestData.ReadInt32());
GameCardPartitionRaw partitionId = (GameCardPartitionRaw) context.RequestData.ReadInt32();
GameCardHandle handle = new GameCardHandle(context.RequestData.ReadInt32());
GameCardPartitionRaw partitionId = (GameCardPartitionRaw)context.RequestData.ReadInt32();
Result result = _baseFileSystemProxy.OpenGameCardStorage(out LibHac.Fs.IStorage storage, handle, partitionId);
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.NcaUtils;
using Ryujinx.Common.Logging;
@ -8,7 +9,7 @@ using Ryujinx.HLE.Resource;
using Ryujinx.HLE.Utilities;
using System.Collections.Generic;
using System.IO;
using LibHac;
using static Ryujinx.HLE.HOS.Services.Time.TimeZone.TimeZoneRule;
namespace Ryujinx.HLE.HOS.Services.Time.TimeZone

View file

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