aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Horizon/Sdk/Sf/Hipc/SpecialHeader.cs
blob: 8b747626d463b055a37f5b3cba831e204fcf6f37 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using Ryujinx.Common.Utilities;

namespace Ryujinx.Horizon.Sdk.Sf.Hipc
{
    struct SpecialHeader
    {
        private uint _word;

        public bool SendPid
        {
            get => _word.Extract(0);
            set => _word = _word.Insert(0, value);
        }

        public int CopyHandlesCount
        {
            get => (int)_word.Extract(1, 4);
            set => _word = _word.Insert(1, 4, (uint)value);
        }

        public int MoveHandlesCount
        {
            get => (int)_word.Extract(5, 4);
            set => _word = _word.Insert(5, 4, (uint)value);
        }
    }
}