public PS3uDrawTabletDevice() { ButtonState = new TabletButtonState(); DPadState = new TabletDPadState(); UnknownData1 = new byte[_UNKNOWN_DATA1_SIZE]; AccelerometerData = new TabletAccelerometerData(); _device = new HIDDevice(_VENDOR_ID, _PRODUCT_ID); _device.DataReceived += _device_DataReceived; }
public Xbox360uDrawTabletDevice(WirelessReceiver receiver, int index) { ButtonState = new TabletButtonState(); DPadState = new TabletDPadState(); AccelerometerData = new TabletAccelerometerData(); _index = index; _receiver = receiver; _receiver.EventDataReceived += _receiver_EventDataReceived; }
public Xbox360InputDevice(WirelessReceiver receiver, int index, WirelessReceiver.DeviceInformation info) { ButtonState = new TabletButtonState(); DPadState = new TabletDPadState(); AccelerometerData = new TabletAccelerometerData(); _index = index; _receiver = receiver; Info = info; _receiver.EventDataReceived += _receiver_EventDataReceived; }
public WiiInputDevice(string devicePath, int? index) { ButtonState = new TabletButtonState(); DPadState = new TabletDPadState(); AccelerometerData = new TabletAccelerometerData(); _acknowledgements = new Dictionary<byte, int>(); _device = new HIDDevice(devicePath); //Initialize the device Index = index; _device.DataReceived += _device_DataReceived; if (index.HasValue) { EnableLEDs(index.Value == 0, index.Value == 1, index.Value == 2, index.Value == 3); } //Get the initial status _lastReportingMode = 0x37; RefreshStatus(); }
public WiiInputDevice(string devicePath, int?index) { ButtonState = new TabletButtonState(); DPadState = new TabletDPadState(); AccelerometerData = new TabletAccelerometerData(); _acknowledgements = new Dictionary <byte, int>(); _device = new HIDDevice(devicePath); //Initialize the device Index = index; _device.DataReceived += _device_DataReceived; if (index.HasValue) { EnableLEDs(index.Value == 0, index.Value == 1, index.Value == 2, index.Value == 3); } //Get the initial status _lastReportingMode = 0x37; RefreshStatus(); }