/// <summary> /// Gets the Battery information. /// </summary> /// <param name="dwUserIndex">The Index.</param> /// <param name="devType">The DevType.</param> /// <param name="pBatteryInformation">The BatteryInformation.</param> /// <returns></returns> internal static int XInputGetBatteryInformation ( int dwUserIndex, byte devType, ref XInputBatteryInformation pBatteryInformation ) { return(0); }
public static string GetBatteryType(PlayerIndex playerIndex) { string strReturn = ""; XInputBatteryInformation gamepad = new XInputBatteryInformation(); Imports.XInputGetBatteryInformation((int)playerIndex, (byte)0, ref gamepad); strReturn = gamepad.ToString(); return(strReturn); }
private void UpdateBatteryState() { var headset = new XInputBatteryInformation(); var gamepad = new XInputBatteryInformation(); NativeMethods.XInputGetBatteryInformation(this.playerIndex, (byte)BatteryDeviceType.BATTERY_DEVTYPE_GAMEPAD, ref gamepad); NativeMethods.XInputGetBatteryInformation(this.playerIndex, (byte)BatteryDeviceType.BATTERY_DEVTYPE_HEADSET, ref headset); this.BatteryInformationHeadset = headset; this.BatteryInformationGamepad = gamepad; }
public int GetBatteryInformation(int dwUserIndex, byte devType, ref XInputBatteryInformation pBatteryInformation) { switch (dllIndex) { case 0: return(XInputGetBatteryInformation14(dwUserIndex, devType, ref pBatteryInformation)); case 1: return(XInputGetBatteryInformation13(dwUserIndex, devType, ref pBatteryInformation)); default: return(-1); } }
/// <summary> /// Gets the Battery information. /// </summary> /// <param name="dwUserIndex">The Index.</param> /// <param name="devType">The DevType.</param> /// <param name="pBatteryInformation">The BatteryInformation.</param> /// <returns></returns> internal static int XInputGetBatteryInformation(int dwUserIndex, byte devType, ref XInputBatteryInformation pBatteryInformation) { return NativeMethods.XInputGetBatteryInformation(dwUserIndex, devType, ref pBatteryInformation); }
/// <summary> /// Gets the Battery information. /// </summary> /// <param name="dwUserIndex">The Index.</param> /// <param name="devType">The DevType.</param> /// <param name="pBatteryInformation">The BatteryInformation.</param> /// <returns></returns> internal static int XInputGetBatteryInformation( int dwUserIndex, byte devType, ref XInputBatteryInformation pBatteryInformation ) { return 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 );
public static extern int XInputGetBatteryInformation(int userIndex, byte devType, ref XInputBatteryInformation batteryInformation);
public static extern int XInputGetBatteryInformation14(int dwUserIndex, byte devType, ref XInputBatteryInformation pBatteryInformation);
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 );
public static string GetBatteryType(PlayerIndex playerIndex) { string strReturn = ""; XInputBatteryInformation gamepad = new XInputBatteryInformation(); Imports.XInputGetBatteryInformation((int)playerIndex, (byte)0, ref gamepad); strReturn = gamepad.ToString(); return strReturn; }
/// <summary> /// Gets the Battery information. /// </summary> /// <param name="dwUserIndex">The Index.</param> /// <param name="devType">The DevType.</param> /// <param name="pBatteryInformation">The BatteryInformation.</param> /// <returns></returns> internal static int XInputGetBatteryInformation(int dwUserIndex, byte devType, ref XInputBatteryInformation pBatteryInformation) { return(NativeMethods.XInputGetBatteryInformation(dwUserIndex, devType, ref pBatteryInformation)); }
public XInputGamePad() { batteryInfo = new XInputBatteryInformation(); _state = new XInputState(); }