2018-11-28 22:18:09 +00:00
|
|
|
|
using System.IO;
|
2018-06-18 02:28:11 +00:00
|
|
|
|
|
|
|
|
|
namespace Ryujinx.HLE.Loaders.Npdm
|
|
|
|
|
{
|
2018-08-16 23:47:36 +00:00
|
|
|
|
class KernelAccessControl
|
2018-06-18 02:28:11 +00:00
|
|
|
|
{
|
2018-11-28 22:18:09 +00:00
|
|
|
|
public int[] Capabilities { get; private set; }
|
2018-06-18 02:28:11 +00:00
|
|
|
|
|
2018-08-16 23:47:36 +00:00
|
|
|
|
public KernelAccessControl(Stream Stream, int Offset, int Size)
|
2018-06-18 02:28:11 +00:00
|
|
|
|
{
|
2018-08-16 23:47:36 +00:00
|
|
|
|
Stream.Seek(Offset, SeekOrigin.Begin);
|
2018-06-18 02:28:11 +00:00
|
|
|
|
|
2018-11-28 22:18:09 +00:00
|
|
|
|
Capabilities = new int[Size / 4];
|
2018-06-18 02:28:11 +00:00
|
|
|
|
|
2018-11-28 22:18:09 +00:00
|
|
|
|
BinaryReader Reader = new BinaryReader(Stream);
|
2018-06-18 02:28:11 +00:00
|
|
|
|
|
2018-11-28 22:18:09 +00:00
|
|
|
|
for (int Index = 0; Index < Capabilities.Length; Index++)
|
2018-06-18 02:28:11 +00:00
|
|
|
|
{
|
2018-11-28 22:18:09 +00:00
|
|
|
|
Capabilities[Index] = Reader.ReadInt32();
|
2018-06-18 02:28:11 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|