Пример #1
0
        private static IWheelSteerLockSetter GetSteerLockSetter(IniFile ini)
        {
            var steer = ini["STEER"];
            var joy   = ini["CONTROLLERS"].GetNonEmpty("PGUID" + steer.GetInt("JOY", -1));

            Logging.Debug($"Device GUID: {joy}");
            return(WheelSteerLock.Get(joy));
        }
Пример #2
0
        internal void DetectDevices()
        {
            DirectInput di = new DirectInput();

            foreach (DeviceInstance device in di.GetDevices(DeviceClass.GameControl, DeviceEnumerationFlags.AttachedOnly))
            {
                //SimHub.Logging.Current.Info("AccSteeringLock: detected: " + device.ProductGuid + " " + device.ProductName);
                wheel = WheelSteerLock.Get(device.ProductGuid.ToString());
                if (wheel != null)
                {
                    SimHub.Logging.Current.Info("AccSteeringLock: found supported wheel: " + device.ProductName + " handled by: " + wheel.ControllerName);
                    break;
                }
            }

            if (wheel == null)
            {
                SimHub.Logging.Current.Warn("AccSteeringLock: no supported wheel found.");
            }
        }