public void UpdateBattery() { Battery.Information gamepad = new Battery.Information(); InputWrapper.XInputGetBatteryInformation( userIndex, (byte)Battery.At.Gamepad, ref gamepad); batteryInfo = gamepad; }
public static extern int XInputGetBatteryInformation ( int dwUserIndex, // Index of the gamer associated with the device byte devType, // Which device on this user index ref Battery.Information pBatteryInformation // Contains the level and types of batteries );