No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

QuerySamplingFrequencyCommand.cs 925B

1234567891011121314151617181920212223242526272829303132
  1. using System.Runtime.InteropServices;
  2. using UnityEngine.InputSystem.Utilities;
  3. namespace UnityEngine.InputSystem.LowLevel
  4. {
  5. [StructLayout(LayoutKind.Explicit, Size = kSize)]
  6. internal struct QuerySamplingFrequencyCommand : IInputDeviceCommandInfo
  7. {
  8. public static FourCC Type { get { return new FourCC('S', 'M', 'P', 'L'); } }
  9. internal const int kSize = InputDeviceCommand.kBaseCommandSize + sizeof(float);
  10. [FieldOffset(0)]
  11. public InputDeviceCommand baseCommand;
  12. [FieldOffset(InputDeviceCommand.kBaseCommandSize)]
  13. public float frequency;
  14. public FourCC typeStatic
  15. {
  16. get { return Type; }
  17. }
  18. public static QuerySamplingFrequencyCommand Create()
  19. {
  20. return new QuerySamplingFrequencyCommand
  21. {
  22. baseCommand = new InputDeviceCommand(Type, kSize)
  23. };
  24. }
  25. }
  26. }