Esempio n. 1
0
        public void UpdateBatteryState()
        {
            XInputBatteryInformation headset = new XInputBatteryInformation(),
                                     gamepad = new XInputBatteryInformation();

            XInput.XInputGetBatteryInformation(_playerIndex, (byte)BatteryDeviceType.BATTERY_DEVTYPE_GAMEPAD, ref gamepad);
            XInput.XInputGetBatteryInformation(_playerIndex, (byte)BatteryDeviceType.BATTERY_DEVTYPE_HEADSET, ref headset);

            BatteryInformationHeadset = headset;
            BatteryInformationGamepad = gamepad;
        }
Esempio n. 2
0
 public static extern int XInputGetBatteryInformation
 (
     int dwUserIndex,        // Index of the gamer associated with the device
     byte devType,            // Which device on this user index
     ref XInputBatteryInformation pBatteryInformation // Contains the level and types of batteries
 );
Esempio n. 3
0
        //Since the following two functions are only available on Windows 8, we just return 0

        public static int XInputGetBatteryInformation(int dwUserIndex, byte devType, ref XInputBatteryInformation pBatteryInformation)
        {
           return 0;
        }
Esempio n. 4
0
 public static extern int XInputGetBatteryInformation
 (
     int dwUserIndex,                                 // Index of the gamer associated with the device
     byte devType,                                    // Which device on this user index
     ref XInputBatteryInformation pBatteryInformation // Contains the level and types of batteries
 );
Esempio n. 5
0
        //Since the following two functions are only available on Windows 8, we just return 0

        public static int XInputGetBatteryInformation(int dwUserIndex, byte devType, ref XInputBatteryInformation pBatteryInformation)
        {
            return(0);
        }