public BatteryInformation GetBatteryInformation(BatteryDeviceType batteryDeviceType) { BatteryInformation information; ErrorCodeHelper.ToResult(SharpDX.XInput.XInput.XInputGetBatteryInformation((int)this.userIndex, batteryDeviceType, out information)).CheckError(); return(information); }
public int XInputGetBatteryInformation( int dwUserIndex, BatteryDeviceType devType, out BatteryInformation batteryInformationRef) { throw new NotSupportedException("Method not supported on XInput9.1.0"); }
/// <summary> /// Gets the battery information. /// </summary> /// <param name="batteryDeviceType">Type of the battery device.</param> /// <returns></returns> /// <unmanaged>unsigned int XInputGetBatteryInformation([In] XUSER_INDEX dwUserIndex,[In] BATTERY_DEVTYPE devType,[Out] XINPUT_BATTERY_INFORMATION* pBatteryInformation)</unmanaged> public BatteryInformation GetBatteryInformation(BatteryDeviceType batteryDeviceType) { BatteryInformation temp; var result = ErrorCodeHelper.ToResult(XInput.XInputGetBatteryInformation((int)userIndex, batteryDeviceType, out temp)); result.CheckError(); return temp; }
public int XInputGetBatteryInformation( int dwUserIndex, BatteryDeviceType devType, out BatteryInformation batteryInformationRef) { return(Native.XInputGetBatteryInformation(dwUserIndex, devType, out batteryInformationRef)); }
public BatteryInformation GetBatteryInformation(BatteryDeviceType batteryDeviceType) { BatteryInformation batteryInformationRef; ErrorCodeHelper.ToResult(XInput.XInputGetBatteryInformation((int)this.userIndex, batteryDeviceType, out batteryInformationRef)).CheckError(); return(batteryInformationRef); }
public static unsafe ErrorCode XInputGetBatteryInformation(int userIndex, BatteryDeviceType devType, out BatteryInformation batteryInformation) { batteryInformation = new BatteryInformation(); try { return(GetMethod <XInputGetBatteryInformationDelegate>("XInputGetBatteryInformation")(userIndex, (int)devType, out batteryInformation)); } catch (AccessViolationException ex) { throw new Exception(ex.Message); } catch (Exception) { throw; } }
public static unsafe int XInputGetBatteryInformation(int dwUserIndex, BatteryDeviceType devType, out BatteryInformation batteryInformationRef) { batteryInformationRef = new BatteryInformation(); int batteryInformation; fixed (BatteryInformation* batteryInformationPtr = &batteryInformationRef) batteryInformation = XInput.XInputGetBatteryInformation_(dwUserIndex, (int) devType, (void*) batteryInformationPtr); return batteryInformation; }
/// <summary> /// Gets the battery information. /// </summary> /// <param name="batteryDeviceType">Type of the battery device.</param> /// <returns></returns> /// <unmanaged>unsigned int XInputGetBatteryInformation([In] XUSER_INDEX dwUserIndex,[In] BATTERY_DEVTYPE devType,[Out] XINPUT_BATTERY_INFORMATION* pBatteryInformation)</unmanaged> public BatteryInformation GetBatteryInformation(BatteryDeviceType batteryDeviceType) { BatteryInformation temp; var result = ErrorCodeHelper.ToResult(xinput.XInputGetBatteryInformation((int)userIndex, batteryDeviceType, out temp)); result.CheckError(); return(temp); }
public static unsafe int XInputGetBatteryInformation(int dwUserIndex, BatteryDeviceType devType, out BatteryInformation batteryInformationRef) { batteryInformationRef = new BatteryInformation(); int batteryInformation; fixed(BatteryInformation *batteryInformationPtr = &batteryInformationRef) batteryInformation = XInput.XInputGetBatteryInformation_(dwUserIndex, (int)devType, (void *)batteryInformationPtr); return(batteryInformation); }
public BatteryInformation GetBatteryInformation(BatteryDeviceType batteryDeviceType) { BatteryInformation temp; ErrorCodeHelper.ToResult( openXinput ? NativeOpenXinput.XInputGetBatteryInformation((int)this.userIndex, batteryDeviceType, out temp) : NativeXinput.XInputGetBatteryInformation((int)this.userIndex, batteryDeviceType, out temp) ).CheckError(); return(temp); }
/// <summary> /// Retrieves the battery type and charge status of a wireless controller. /// </summary> /// <param name="userIndex">Index of the signed-in gamer associated with the device. Can be a value in the range 0–<see cref="UserIndex.MaxCount"/> − 1.</param> /// <param name="devType">Specifies which device associated with this user index should be queried. Must be <see cref="BatteryDeviceType.Gamepad"/> or <see cref="BatteryDeviceType.Headset"/>.</param> /// <param name="batteryInformation">An <see cref="BatteryInformation"/> structure that receives the battery information.</param> /// <returns>If the function succeeds, the return value is <see cref="Error.Success"/>.</returns> public static Error GetBatteryInformation(UserIndex userIndex, BatteryDeviceType devType, out BatteryInformation batteryInformation) { return(XInputGetBatteryInformation(userIndex, devType, out batteryInformation)); }
public BatteryInformation GetBatteryInformation(BatteryDeviceType batteryDeviceType) { BatteryInformation batteryInformationRef; ErrorCodeHelper.ToResult(XInput.XInputGetBatteryInformation((int) this.userIndex, batteryDeviceType, out batteryInformationRef)).CheckError(); return batteryInformationRef; }
public int XInputGetBatteryInformation(int dwUserIndex, BatteryDeviceType devType, out BatteryInformation batteryInformationRef) { throw new NotSupportedException("Method not supported on XInput9.1.0"); }
private static extern Error XInputGetBatteryInformation(UserIndex userIndex, BatteryDeviceType devType, out BatteryInformation batteryInformation);
public BatteryInformation GetBatteryInformation(BatteryDeviceType batteryDeviceType) { BatteryInformation information; ErrorCodeHelper.ToResult(SharpDX.XInput.XInput.XInputGetBatteryInformation((int) this.userIndex, batteryDeviceType, out information)).CheckError(); return information; }
public static extern int XInputGetBatteryInformation( int dwUserIndex, BatteryDeviceType devType, out BatteryInformation batteryInformationRef);
/// <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); }
int IXInput.XInputGetBatteryInformation(int dwUserIndex, BatteryDeviceType devType, out BatteryInformation batteryInformation) { throw new NotSupportedException("XInputGetBatteryInformation is not supported on XInput9.1.0"); }
int IXInput.XInputGetBatteryInformation(int dwUserIndex, BatteryDeviceType devType, out BatteryInformation batteryInformation) { return(XInputGetBatteryInformation(dwUserIndex, devType, out batteryInformation)); }
/// <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> /// <returns>Instance of <see cref="BatteryInformation"/>.</returns> public static BatteryInformation GetBatteryInformation(int userIndex, BatteryDeviceType batteryDeviceType) { s_xInput.XInputGetBatteryInformation(userIndex, batteryDeviceType, out var result); return(result); }
private static extern int XInputGetBatteryInformation(int dwUserIndex, BatteryDeviceType devType, out BatteryInformation batteryInformation);
/// <summary> /// Gets the battery information. /// /// </summary> /// <param name="batteryDeviceType">Type of the battery device.</param> /// <returns/> /// <unmanaged>unsigned int XInputGetBatteryInformation([In] XUSER_INDEX dwUserIndex,[In] BATTERY_DEVTYPE devType,[Out] XINPUT_BATTERY_INFORMATION* pBatteryInformation)</unmanaged> public BatteryInformation GetBatteryInformation(BatteryDeviceType batteryDeviceType) { #if WINDOWS BatteryInformation batteryInformationRef; ErrorCodeHelper.ToResult(XInput.XInputGetBatteryInformation((int)this.userIndex, batteryDeviceType, out batteryInformationRef)).CheckError(); return batteryInformationRef; #else return BatteryInformation.Empty; #endif }
public string[] StateBat() { BatteryDeviceType battery = new BatteryDeviceType(); string[] Battery = new string[2]; Battery[0] = this.joystick.GetBatteryInformation(battery).Type.ToString(); Battery[1] = this.joystick.GetBatteryInformation(battery).Level.ToString(); return Battery; }
public int XInputGetBatteryInformation(int dwUserIndex, BatteryDeviceType devType, out BatteryInformation batteryInformationRef) { return XInput.XInputGetBatteryInformation(dwUserIndex, devType, out batteryInformationRef); }
public static extern int XInputGetBatteryInformation(int dwUserIndex, BatteryDeviceType devType, out BatteryInformation batteryInformationRef);