Remove HTC ray workaround for XR elite firmware 2
This commit is contained in:
committed by
Guillaume Meunier
parent
00d2727049
commit
3c148bd1dd
+22
-1
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "hmd_traits.h"
|
#include "hmd_traits.h"
|
||||||
|
|
||||||
|
#include "utils/strings.h"
|
||||||
#include "xr/to_string.h"
|
#include "xr/to_string.h"
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
@@ -203,8 +204,28 @@ void hmd_traits::init()
|
|||||||
{
|
{
|
||||||
// Accepts OpenXR 1.1 but doesn't actually implement it
|
// Accepts OpenXR 1.1 but doesn't actually implement it
|
||||||
max_openxr_api_version = XR_API_VERSION_1_0;
|
max_openxr_api_version = XR_API_VERSION_1_0;
|
||||||
|
|
||||||
// Doesn't handle additive blend, so needs specific ray model
|
// Doesn't handle additive blend, so needs specific ray model
|
||||||
controller_ray_model = "assets://ray-htc.glb";
|
// Fixed in XR elite firmware version 2.0
|
||||||
|
bool need_htc_ray = true;
|
||||||
|
const auto version = get_property("ro.product.version");
|
||||||
|
if (version)
|
||||||
|
{
|
||||||
|
auto digits = utils::split(*version, ".");
|
||||||
|
if (not digits.empty())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
auto major = std::stoi(digits[0]);
|
||||||
|
if (major >= 2 and model == "VIVE XR Series")
|
||||||
|
need_htc_ray = false;
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (need_htc_ray)
|
||||||
|
controller_ray_model = "assets://ray-htc.glb";
|
||||||
|
|
||||||
controller_profile = "htc-vive-focus-3";
|
controller_profile = "htc-vive-focus-3";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user