public static DS4OutDevice CreateDS4Device(ViGEmClient client, Version driverVersion) { DS4OutDevice result = null; if (extAPIMinVersion.CompareTo(driverVersion) <= 0) { result = new DS4OutDeviceExt(client); } else { result = new DS4OutDeviceBasic(client); } return result; }
public OutputDevice AllocateController(OutControllerType contType, ViGEmClient client) { OutputDevice outputDevice = null; switch (contType) { case OutControllerType.X360: outputDevice = new Xbox360OutDevice(client); break; case OutControllerType.DS4: outputDevice = new DS4OutDevice(client); break; case OutControllerType.None: default: break; } return(outputDevice); }