2018-11-28 21:01:19 -05:00
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
|
|
namespace Ryujinx.HLE.Loaders.Npdm
|
|
|
|
|
{
|
2019-11-28 23:32:51 -05:00
|
|
|
|
public class KernelAccessControl
|
2018-11-28 21:01:19 -05:00
|
|
|
|
{
|
2018-12-04 19:52:39 -05:00
|
|
|
|
public int[] Capabilities { get; private set; }
|
2018-11-28 21:01:19 -05:00
|
|
|
|
|
2018-12-06 06:16:24 -05:00
|
|
|
|
public KernelAccessControl(Stream stream, int offset, int size)
|
2018-11-28 21:01:19 -05:00
|
|
|
|
{
|
2018-12-06 06:16:24 -05:00
|
|
|
|
stream.Seek(offset, SeekOrigin.Begin);
|
2018-11-28 21:01:19 -05:00
|
|
|
|
|
2018-12-06 06:16:24 -05:00
|
|
|
|
Capabilities = new int[size / 4];
|
2018-11-28 21:01:19 -05:00
|
|
|
|
|
2018-12-06 06:16:24 -05:00
|
|
|
|
BinaryReader reader = new BinaryReader(stream);
|
2018-11-28 21:01:19 -05:00
|
|
|
|
|
2018-12-06 06:16:24 -05:00
|
|
|
|
for (int index = 0; index < Capabilities.Length; index++)
|
2018-11-28 21:01:19 -05:00
|
|
|
|
{
|
2018-12-06 06:16:24 -05:00
|
|
|
|
Capabilities[index] = reader.ReadInt32();
|
2018-11-28 21:01:19 -05:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|