WVR_GetDeviceBatteryPercentage¶
- WVR_EXPORT float WVR_GetDeviceBatteryPercentage(WVR_DeviceType type)
Get current battery capacity of specified device with percentage.
- Return
- The percentage of battery of specified device.
- Parameters
- type -
Type of the device to get the InputDeviceState. (refer to WVR_DeviceType)
- type -
How to use¶
Here is an example for the function:
#include <wvr/wvr_status.h>
// To get HMD device Battery Percentage
float Percentage = 0.0;
Percentage = WVR_GetDeviceBatteryPercentage(WVR_DeviceType_HMD);
Note
The WVR_GetDeviceBatteryPercentage will return value from 0 to 1. If the Battery Percentage is 22% now , then returned value is 0.22.