Esempio n. 1
0
 /// <summary>
 /// Retrieves the battery type and charge status of a wireless controller.
 /// </summary>
 /// <param name="userIndex">Index of the user's controller. Can be a value in the range 0–3. </param>
 /// <param name="batteryDeviceType">Type of the battery device.</param>
 /// <param name="batteryInformation">The battery information.</param>
 /// <returns>True if succeed, false otherwise.</returns>
 public static bool GetBatteryInformation(int userIndex, BatteryDeviceType batteryDeviceType, out BatteryInformation batteryInformation)
 {
     return(s_xInput.XInputGetBatteryInformation(userIndex, batteryDeviceType, out batteryInformation) == 0);
 }
Esempio n. 2
0
 int IXInput.XInputGetBatteryInformation(int dwUserIndex, BatteryDeviceType devType, out BatteryInformation batteryInformation)
 {
     return(XInputGetBatteryInformation(dwUserIndex, devType, out batteryInformation));
 }
Esempio n. 3
0
 private static extern int XInputGetBatteryInformation(int dwUserIndex, BatteryDeviceType devType, out BatteryInformation batteryInformation);
Esempio n. 4
0
 int IXInput.XInputGetBatteryInformation(int dwUserIndex, BatteryDeviceType devType, out BatteryInformation batteryInformation)
 {
     throw new NotSupportedException("XInputGetBatteryInformation is not supported on XInput9.1.0");
 }