Update ACI0.cs
This commit is contained in:
parent
b8142cb6c3
commit
49bf3dc2f1
1 changed files with 10 additions and 8 deletions
|
@ -4,7 +4,7 @@ using System.IO;
|
|||
|
||||
namespace Ryujinx.HLE.Loaders.Npdm
|
||||
{
|
||||
public class ACI0
|
||||
class ACI0
|
||||
{
|
||||
public string TitleId;
|
||||
|
||||
|
@ -19,13 +19,15 @@ namespace Ryujinx.HLE.Loaders.Npdm
|
|||
public ServiceAccessControl ServiceAccessControl;
|
||||
public KernelAccessControl KernelAccessControl;
|
||||
|
||||
public const long ACI0Magic = 'A' << 0 | 'C' << 8 | 'I' << 16 | '0' << 24;
|
||||
|
||||
public ACI0(Stream ACI0Stream, int Offset)
|
||||
{
|
||||
ACI0Stream.Seek(Offset, SeekOrigin.Begin);
|
||||
|
||||
BinaryReader Reader = new BinaryReader(ACI0Stream);
|
||||
|
||||
if (EndianSwap.Swap32(Reader.ReadInt32()) != 0x41434930) // ACI0
|
||||
if (Reader.ReadInt32() != ACI0Magic)
|
||||
{
|
||||
throw new InvalidNpdmException("ACI0 Stream doesn't contain ACI0 section!");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue