diff --git a/doc/changes/drivers/mr.2221.md b/doc/changes/drivers/mr.2221.md new file mode 100644 index 000000000..aec591f71 --- /dev/null +++ b/doc/changes/drivers/mr.2221.md @@ -0,0 +1,2 @@ +- ohmd: Disable WMR and Rift S drivers with a warning to use the native +drivers. diff --git a/src/xrt/drivers/ohmd/oh_device.c b/src/xrt/drivers/ohmd/oh_device.c index 04ba40d29..72c7e3ef7 100644 --- a/src/xrt/drivers/ohmd/oh_device.c +++ b/src/xrt/drivers/ohmd/oh_device.c @@ -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 */ for (int i = 0; i < device_count; i++) { 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_FLAGS, &device_flags); @@ -1183,10 +1182,16 @@ oh_device_create(ohmd_context *ctx, bool no_hmds, struct xrt_device **out_xdevs) 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()) { U_LOG_D("Rejecting device idx %i, is a External device.", i); 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) {