mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
Fix Services
it can have multiple items of one Service
This commit is contained in:
parent
f3d7054c79
commit
7904772fc0
2 changed files with 14 additions and 5 deletions
|
@ -2,7 +2,7 @@ using System.Collections.Generic;
|
||||||
|
|
||||||
namespace LibHac.Npdm
|
namespace LibHac.Npdm
|
||||||
{
|
{
|
||||||
public struct KernelAccessControlItem
|
public class KernelAccessControlItem
|
||||||
{
|
{
|
||||||
public bool HasKernelFlags { get; set; }
|
public bool HasKernelFlags { get; set; }
|
||||||
public uint LowestThreadPriority { get; set; }
|
public uint LowestThreadPriority { get; set; }
|
||||||
|
@ -29,5 +29,13 @@ namespace LibHac.Npdm
|
||||||
public bool HasDebugFlags { get; set; }
|
public bool HasDebugFlags { get; set; }
|
||||||
public bool AllowDebug { get; set; }
|
public bool AllowDebug { get; set; }
|
||||||
public bool ForceDebug { get; set; }
|
public bool ForceDebug { get; set; }
|
||||||
|
|
||||||
|
public KernelAccessControlItem()
|
||||||
|
{
|
||||||
|
NormalMmio = new List<KernelAccessControlMmio>();
|
||||||
|
PageMmio = new List<KernelAccessControlMmio>();
|
||||||
|
Irq = new List<KernelAccessControlIrq>();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
}
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
namespace LibHac.Npdm
|
namespace LibHac.Npdm
|
||||||
{
|
{
|
||||||
public class ServiceAccessControl
|
public class ServiceAccessControl
|
||||||
{
|
{
|
||||||
public Dictionary<string, bool> Services { get; } = new Dictionary<string, bool>();
|
public List<Tuple<string, bool>> Services { get; } = new List<Tuple<string, bool>>();
|
||||||
|
|
||||||
public ServiceAccessControl(Stream stream, int offset, int size)
|
public ServiceAccessControl(Stream stream, int offset, int size)
|
||||||
{
|
{
|
||||||
|
@ -27,7 +28,7 @@ namespace LibHac.Npdm
|
||||||
int length = ((controlByte & 0x07)) + 1;
|
int length = ((controlByte & 0x07)) + 1;
|
||||||
bool registerAllowed = ((controlByte & 0x80) != 0);
|
bool registerAllowed = ((controlByte & 0x80) != 0);
|
||||||
|
|
||||||
Services.Add(reader.ReadAscii(length), registerAllowed);
|
Services.Add(new Tuple<string, bool>(reader.ReadAscii(length), registerAllowed));
|
||||||
|
|
||||||
bytesRead += length + 1;
|
bytesRead += length + 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue