A game about forced loneliness, made by TACStudios
at master 1.1 kB view raw
1using System.Runtime.InteropServices; 2using UnityEngine.InputSystem.Utilities; 3 4namespace UnityEngine.InputSystem.LowLevel 5{ 6 /// <summary> 7 /// Query dimensions of a device. 8 /// </summary> 9 /// <remarks> 10 /// This is usually used to query screen dimensions from pointer devices. 11 /// </remarks> 12 [StructLayout(LayoutKind.Explicit, Size = kSize)] 13 public struct QueryDimensionsCommand : IInputDeviceCommandInfo 14 { 15 public static FourCC Type { get { return new FourCC('D', 'I', 'M', 'S'); } } 16 17 internal const int kSize = InputDeviceCommand.kBaseCommandSize + sizeof(float) * 2; 18 19 [FieldOffset(0)] 20 public InputDeviceCommand baseCommand; 21 22 [FieldOffset(InputDeviceCommand.kBaseCommandSize)] 23 public Vector2 outDimensions; 24 25 public FourCC typeStatic 26 { 27 get { return Type; } 28 } 29 30 public static QueryDimensionsCommand Create() 31 { 32 return new QueryDimensionsCommand 33 { 34 baseCommand = new InputDeviceCommand(Type, kSize) 35 }; 36 } 37 } 38}