Monado OpenXR Runtime
Loading...
Searching...
No Matches
rift_prober.c File Reference

Prober for finding an Oculus Rift device based on USB VID/PID. More...

#include "xrt/xrt_prober.h"
#include "util/u_misc.h"
#include "util/u_logging.h"
#include "rift_internal.h"
Include dependency graph for rift_prober.c:

Functions

bool rift_is_oculus (struct xrt_prober *xp, struct xrt_prober_device *dev)
 Checks whether the given device is an Oculus device, by checking the manufacturer string.
 
int rift_found (struct xrt_prober *xp, struct xrt_prober_device **devices, size_t device_count, size_t index, cJSON *attached_data, struct xrt_device **out_xdevs)
 Probing function for Oculus Rift devices.
 

Detailed Description

Prober for finding an Oculus Rift device based on USB VID/PID.

Author
Beyley Cardellio ep1cm.nosp@m.1n10.nosp@m.n123@.nosp@m.gmai.nosp@m.l.com

Function Documentation

◆ rift_found()

int rift_found ( struct xrt_prober xp,
struct xrt_prober_device **  devices,
size_t  device_count,
size_t  index,
cJSON *  attached_data,
struct xrt_device **  out_xdev 
)

Probing function for Oculus Rift devices.

See also
xrt_prober_found_func_t

References xrt_device::hmd, xrt_prober_device::product_id, rift_is_oculus(), and U_LOG_I.

◆ rift_is_oculus()

bool rift_is_oculus ( struct xrt_prober xp,
struct xrt_prober_device dev 
)

Checks whether the given device is an Oculus device, by checking the manufacturer string.

Parameters
xpThe prober to use for getting string descriptors.
devThe device to check.
Returns
true if the device is an Oculus device, false otherwise.

Referenced by rift_found().