public bool Update(XinputReport reportobj) { Byte[] input = reportobj.ToBytes(); Byte[] rumble = new Byte[8]; Byte[] report = new Byte[28]; bus.Parse(input, report); if (bus.Report(report, rumble)) { if (rumble[1] == 0x08) { Byte big = (Byte)(rumble[3]); Byte small = (Byte)(rumble[4]); if (OnRumble != null) { OnRumble(big, small); } } return true; } return false; }
public bool Update(XinputReport reportobj) { Byte[] input = reportobj.ToBytes(); Byte[] rumble = new Byte[8]; Byte[] report = new Byte[28]; bus.Parse(input, report); if (bus.Report(report, rumble)) { if (rumble[1] == 0x08) { Byte big = (Byte)(rumble[3]); Byte small = (Byte)(rumble[4]); if (OnRumble != null) { OnRumble(big, small); } } return(true); } return(false); }
public WiiKeyMap(JObject jsonObj, string configName, string configFilename, XinputDevice xinput, XinputReport xinputReport) { this.Name = configName; this.Filename = configFilename; this.jsonObj = jsonObj; this.inputSimulator = new InputSimulator(); this.XinputDevice = xinput; this.XinputReport = xinputReport; xinput.OnRumble += Xinput_OnRumble; }