Maze / Library /PackageCache /com.unity.inputsystem@1.6.1 /InputSystem /Plugins /OSX /OSXGameController.cs
| using System.Runtime.InteropServices; | |
| using UnityEngine.InputSystem.Layouts; | |
| using UnityEngine.InputSystem.LowLevel; | |
| using UnityEngine.InputSystem.Utilities; | |
| using UnityEngine.InputSystem.OSX.LowLevel; | |
| using UnityEngine.InputSystem.Controls; | |
| namespace UnityEngine.InputSystem.OSX.LowLevel | |
| { | |
| /// <summary> | |
| /// Structure of HID input reports for SteelSeries Nimbus+ controllers supported | |
| /// via HID on OSX. | |
| /// </summary> | |
| [] | |
| internal struct NimbusPlusHIDInputReport : IInputStateTypeInfo | |
| { | |
| /// <summary> | |
| /// A dummy vendor ID made available by OSX when supporting Nimbus+ via HID. | |
| /// This is exposed by OSX instead of the true SteelSeries vendor ID 0x1038. | |
| /// </summary> | |
| public const int OSXVendorId = 0xd; | |
| /// <summary> | |
| /// A dummy product ID made available by OSX when supporting Nimbus+ via HID. | |
| /// This is exposed by OSX instead of the true Nimbus+ product ID 0x1422. | |
| /// </summary> | |
| public const int OSXProductId = 0x0; | |
| public FourCC format => new FourCC('H', 'I', 'D'); | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] public sbyte leftStickX; | |
| [] public sbyte leftStickY; | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] public sbyte rightStickX; | |
| [] public sbyte rightStickY; | |
| [] | |
| [] public byte leftTrigger; | |
| [] | |
| [] public byte rightTrigger; | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] public byte buttons1; | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] public byte buttons2; | |
| } | |
| } | |
| namespace UnityEngine.InputSystem.OSX | |
| { | |
| /// <summary> | |
| /// Steel Series Nimbus+ uses iOSGameController MFI when on iOS but | |
| /// is just a standard HID on OSX. Note that the gamepad is made available | |
| /// with incorrect VID/PID by OSX instead of the true VID/PID registred with | |
| /// USB.org for this device. | |
| /// </summary> | |
| [] | |
| [] | |
| public class NimbusGamepadHid : Gamepad | |
| { | |
| /// <summary> | |
| /// The center button in the middle section of the controller. | |
| /// </summary> | |
| /// <remarks> | |
| /// Note that this button is also picked up by OS. | |
| /// </remarks> | |
| [] | |
| public ButtonControl homeButton { get; protected set; } | |
| /// <inheritdoc /> | |
| protected override void FinishSetup() | |
| { | |
| homeButton = GetChildControl<ButtonControl>("homeButton"); | |
| Debug.Assert(homeButton != null); | |
| base.FinishSetup(); | |
| } | |
| } | |
| } | |