Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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;
        }
Ejemplo n.º 4
0
        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;
        }