Function thindx::xinput::get_battery_information
source · [−]pub fn get_battery_information(
user_index: impl Into<User>,
dev_type: impl Into<BatteryDevType>
) -> Result<BatteryInformation, MethodError>
Expand description
[docs.microsoft.com] XInputGetBatteryInformation
Arguments
user_index
Identify which user’s controller to get the battery information ofdev_type
BatteryDevType::Gamepad or BatteryDevType::Headset
Errors
- ERROR::BAD_ARGUMENTS - Invalid
User
orUser::Any
- ERROR::DEVICE_NOT_CONNECTED - Disconnected
User
- ERROR::DEVICE_NOT_CONNECTED - Invalid
BatteryDevType