public NativeInputDeviceManager()
        {
            attachedDevices = new List <NativeInputDevice>();
            detachedDevices = new List <NativeInputDevice>();

            systemDeviceProfiles = new List <NativeInputDeviceProfile>(NativeInputDeviceProfileList.Profiles.Length);
            customDeviceProfiles = new List <NativeInputDeviceProfile>();

            AddSystemDeviceProfiles();

            var options = new NativeInputOptions();

            options.enableXInput = InputManager.NativeInputEnableXInput;
            options.preventSleep = InputManager.NativeInputPreventSleep;

            if (InputManager.NativeInputUpdateRate > 0)
            {
                options.updateRate = (UInt16)InputManager.NativeInputUpdateRate;
            }
            else
            {
                options.updateRate = (UInt16)Mathf.FloorToInt(1.0f / Time.fixedDeltaTime);
            }

            Native.Init(options);
        }
        public NativeInputDeviceManager()
        {
            attachedDevices      = new List <NativeInputDevice>();
            detachedDevices      = new List <NativeInputDevice>();
            systemDeviceProfiles = new List <NativeInputDeviceProfile>(NativeInputDeviceProfileList.Profiles.Length);
            customDeviceProfiles = new List <NativeInputDeviceProfile>();
            deviceEvents         = new uint[32];
            AddSystemDeviceProfiles();
            NativeInputOptions options = new NativeInputOptions
            {
                enableXInput = InputManager.NativeInputEnableXInput,
                preventSleep = InputManager.NativeInputPreventSleep
            };

            if (InputManager.NativeInputUpdateRate != 0)
            {
                options.updateRate = (ushort)InputManager.NativeInputUpdateRate;
            }
            else
            {
                options.updateRate = (ushort)Mathf.FloorToInt(1f / Time.fixedDeltaTime);
            }
            Native.Init(options);
        }
示例#3
0
 public static void Init(NativeInputOptions options)
 {
 }
示例#4
0
 public static extern void Init(NativeInputOptions options);
示例#5
0
 public static void Init(NativeInputOptions options)
 {
     SetDebugPrintFunc(OnDebugPrint);
     Init(OnDeviceAttached, OnDeviceDetached, options);
 }
示例#6
0
 static extern void Init(DeviceAttachedCallback deviceAttached, DeviceDetachedCallback deviceDetached, NativeInputOptions options);