mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-31 07:27:11 +02:00
Move solution and projects to src
This commit is contained in:
parent
cd124bda58
commit
cee7121058
3466 changed files with 55 additions and 55 deletions
37
src/Ryujinx.HLE/Loaders/Npdm/FsAccessHeader.cs
Normal file
37
src/Ryujinx.HLE/Loaders/Npdm/FsAccessHeader.cs
Normal file
|
@ -0,0 +1,37 @@
|
|||
using Ryujinx.HLE.Exceptions;
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Ryujinx.HLE.Loaders.Npdm
|
||||
{
|
||||
class FsAccessHeader
|
||||
{
|
||||
public int Version { get; private set; }
|
||||
public ulong PermissionsBitmask { get; private set; }
|
||||
|
||||
public FsAccessHeader(Stream stream, int offset, int size)
|
||||
{
|
||||
stream.Seek(offset, SeekOrigin.Begin);
|
||||
|
||||
BinaryReader reader = new BinaryReader(stream);
|
||||
|
||||
Version = reader.ReadInt32();
|
||||
PermissionsBitmask = reader.ReadUInt64();
|
||||
|
||||
int dataSize = reader.ReadInt32();
|
||||
|
||||
if (dataSize != 0x1c)
|
||||
{
|
||||
throw new InvalidNpdmException("FsAccessHeader is corrupted!");
|
||||
}
|
||||
|
||||
int contentOwnerIdSize = reader.ReadInt32();
|
||||
int dataAndContentOwnerIdSize = reader.ReadInt32();
|
||||
|
||||
if (dataAndContentOwnerIdSize != 0x1c)
|
||||
{
|
||||
throw new NotImplementedException("ContentOwnerId section is not implemented!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue