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 int XInputGetBatteryInformation( int dwUserIndex, BatteryDeviceType devType, out BatteryInformation batteryInformationRef) { return(Native.XInputGetBatteryInformation(dwUserIndex, devType, out batteryInformationRef)); }
public int XInputGetBatteryInformation( int dwUserIndex, BatteryDeviceType devType, out BatteryInformation batteryInformationRef) { throw new NotSupportedException("Method not supported on XInput9.1.0"); }
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 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); }
uint XInputGetBatteryInformation_Hooked(int dwUserIndex, int devType, out BatteryInformation pBatteryInformation) { pBatteryInformation = new BatteryInformation(); var controller = new Controller((UserIndex)dwUserIndex); if (controller.IsConnected) { try { pBatteryInformation = controller.GetBatteryInformation((BatteryDeviceType) devType); } catch { return ERROR_DEVICE_NOT_CONNECTED; } } else { pBatteryInformation.BatteryLevel = BatteryLevel.Full; } return ERROR_SUCCESS; }
public int XInputGetBatteryInformation(int dwUserIndex, BatteryDeviceType devType, out BatteryInformation batteryInformationRef) { throw new NotSupportedException("Method not supported on XInput9.1.0"); }
public static extern int XInputGetBatteryInformation( int dwUserIndex, BatteryDeviceType devType, out BatteryInformation batteryInformationRef);
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);