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); }
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; }
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 );