A game about forced loneliness, made by TACStudios
1using System.Runtime.InteropServices;
2using UnityEngine.InputSystem.Utilities;
3
4namespace UnityEngine.InputSystem.LowLevel
5{
6 /// <summary>
7 /// Queries to see if this device is able to continue to send updates and state changes when the application is not if focus.
8 /// </summary>
9 /// <seealso cref="InputDevice.canRunInBackground"/>
10 [StructLayout(LayoutKind.Explicit, Size = InputDeviceCommand.kBaseCommandSize + sizeof(bool))]
11 public struct QueryCanRunInBackground : IInputDeviceCommandInfo
12 {
13 public static FourCC Type => new FourCC('Q', 'R', 'I', 'B');
14
15 internal const int kSize = InputDeviceCommand.kBaseCommandSize + sizeof(bool);
16
17 [FieldOffset(0)]
18 public InputDeviceCommand baseCommand;
19
20 [FieldOffset(InputDeviceCommand.kBaseCommandSize)]
21 public bool canRunInBackground;
22
23 public FourCC typeStatic => Type;
24
25 public static QueryCanRunInBackground Create()
26 {
27 return new QueryCanRunInBackground
28 {
29 baseCommand = new InputDeviceCommand(Type, kSize),
30 canRunInBackground = false
31 };
32 }
33 }
34}