blob: dd60f77cd05240b7c219709c79a50697d18fa9a3 (
plain)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
namespace Ryujinx.Graphics
{
/// <summary>
/// Method call parameters.
/// </summary>
struct MethodParams
{
/// <summary>
/// Method offset.
/// </summary>
public int Method { get; }
/// <summary>
/// Method call argument.
/// </summary>
public int Argument { get; }
/// <summary>
/// Sub-channel where the call should be sent.
/// </summary>
public int SubChannel { get; }
/// <summary>
/// For multiple calls to the same method, this is the remaining calls count.
/// </summary>
public int MethodCount { get; }
/// <summary>
/// Indicates if the current call is the last one from a batch of calls to the same method.
/// </summary>
public bool IsLastCall => MethodCount <= 1;
/// <summary>
/// Constructs the method call parameters structure.
/// </summary>
/// <param name="method">Method offset</param>
/// <param name="argument">Method call argument</param>
/// <param name="subChannel">Optional sub-channel where the method should be sent (not required for macro calls)</param>
/// <param name="methodCount">Optional remaining calls count (not required for macro calls)</param>
public MethodParams(
int method,
int argument,
int subChannel = 0,
int methodCount = 0)
{
Method = method;
Argument = argument;
SubChannel = subChannel;
MethodCount = methodCount;
}
}
}
|