mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
d/ohmd: Reject WMR and Rift S drivers
This commit is contained in:
parent
1e5cfb399a
commit
edb418aa1a
2
doc/changes/drivers/mr.2221.md
Normal file
2
doc/changes/drivers/mr.2221.md
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
- ohmd: Disable WMR and Rift S drivers with a warning to use the native
|
||||||
|
drivers.
|
|
@ -1173,7 +1173,6 @@ oh_device_create(ohmd_context *ctx, bool no_hmds, struct xrt_device **out_xdevs)
|
||||||
/* Find first HMD, first left controller, first right controller, and all trackers */
|
/* Find first HMD, first left controller, first right controller, and all trackers */
|
||||||
for (int i = 0; i < device_count; i++) {
|
for (int i = 0; i < device_count; i++) {
|
||||||
int device_class = 0, device_flags = 0;
|
int device_class = 0, device_flags = 0;
|
||||||
const char *prod = NULL;
|
|
||||||
|
|
||||||
ohmd_list_geti(ctx, i, OHMD_DEVICE_CLASS, &device_class);
|
ohmd_list_geti(ctx, i, OHMD_DEVICE_CLASS, &device_class);
|
||||||
ohmd_list_geti(ctx, i, OHMD_DEVICE_FLAGS, &device_flags);
|
ohmd_list_geti(ctx, i, OHMD_DEVICE_FLAGS, &device_flags);
|
||||||
|
@ -1183,10 +1182,16 @@ oh_device_create(ohmd_context *ctx, bool no_hmds, struct xrt_device **out_xdevs)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
prod = ohmd_list_gets(ctx, i, OHMD_PRODUCT);
|
const char *prod = ohmd_list_gets(ctx, i, OHMD_PRODUCT);
|
||||||
if (strcmp(prod, "External Device") == 0 && !debug_get_bool_option_ohmd_external()) {
|
if (strcmp(prod, "External Device") == 0 && !debug_get_bool_option_ohmd_external()) {
|
||||||
U_LOG_D("Rejecting device idx %i, is a External device.", i);
|
U_LOG_D("Rejecting device idx %i, is a External device.", i);
|
||||||
continue;
|
continue;
|
||||||
|
} else if (strcmp(prod, "HoloLens Sensors") == 0) {
|
||||||
|
U_LOG_W("Ignoring OpenHMD WMR device idx %i. Use the native Monado WMR driver.", i);
|
||||||
|
continue;
|
||||||
|
} else if (strncmp(prod, "Rift S", strlen("Rift S")) == 0) {
|
||||||
|
U_LOG_W("Ignoring OpenHMD Rift S device idx %i. Use the native Monado Rift S driver.", i);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (device_class == OHMD_DEVICE_CLASS_CONTROLLER) {
|
if (device_class == OHMD_DEVICE_CLASS_CONTROLLER) {
|
||||||
|
|
Loading…
Reference in a new issue