Нема описа
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.

RequestSyncCommand.cs 1.0KB

123456789101112131415161718192021222324252627282930313233
  1. using System.Runtime.InteropServices;
  2. using UnityEngine.InputSystem.Utilities;
  3. namespace UnityEngine.InputSystem.LowLevel
  4. {
  5. /// <summary>
  6. /// A command to tell the runtime to sync the device to it's last known state.
  7. /// </summary>
  8. /// <remarks>
  9. /// This triggers an event from the underlying device that represents the whole, current state.
  10. /// </remarks>
  11. /// <seealso cref="RequestResetCommand"/>
  12. [StructLayout(LayoutKind.Explicit, Size = InputDeviceCommand.kBaseCommandSize)]
  13. public struct RequestSyncCommand : IInputDeviceCommandInfo
  14. {
  15. public static FourCC Type => new FourCC('S', 'Y', 'N', 'C');
  16. internal const int kSize = InputDeviceCommand.kBaseCommandSize;
  17. [FieldOffset(0)]
  18. public InputDeviceCommand baseCommand;
  19. public FourCC typeStatic => Type;
  20. public static RequestSyncCommand Create()
  21. {
  22. return new RequestSyncCommand
  23. {
  24. baseCommand = new InputDeviceCommand(Type, kSize)
  25. };
  26. }
  27. }
  28. }