WVR_GetDeviceBatteryPercentage

WVR_EXPORT float WVR_GetDeviceBatteryPercentage(WVR_DeviceType type)

Get the remaining battery power in percentage, of specified device.

Return
The percentage of the remaining battery power of the specified device.
Version
API Level 1
Parameters
  • type: Device type to get the InputDeviceState. (refer to WVR_DeviceType)

How to use

Here is an example for the function:

#include <wvr/wvr_device.h>

// Get HMD remaining battery power in Percentage

float Percentage = 0.0;
Percentage = WVR_GetDeviceBatteryPercentage(WVR_DeviceType_HMD);

Note

The WVR_GetDeviceBatteryPercentage will return a value from 0 to 1. If the current battery power is at 22%, the returned value will be 0.22.