aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.HLE/HOS/Tamper/Conditions/InputMask.cs
blob: 8d75a0e185452b8b466c14e34cd957f6e2c261d4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
namespace Ryujinx.HLE.HOS.Tamper.Conditions
{
    class InputMask : ICondition
    {
        private long _mask;
        private Parameter<long> _input;

        public InputMask(long mask, Parameter<long> input)
        {
            _mask = mask;
            _input = input;
        }

        public bool Evaluate()
        {
            return (_input.Value & _mask) == _mask;
        }
    }
}