Revert "Merge branch 'master' of https://github.com/Vindicus999/WiVRn"
This reverts commit6212dccc2b, reversing changes made to80e31b642a.
This commit is contained in:
+47
-15
@@ -82,8 +82,6 @@ bool configuration::check_feature(feature f) const
|
||||
{
|
||||
std::lock_guard lock(mutex);
|
||||
|
||||
auto & system = application::get_system();
|
||||
|
||||
auto it = features.find(f);
|
||||
if (it == features.end())
|
||||
return false;
|
||||
@@ -96,7 +94,7 @@ bool configuration::check_feature(feature f) const
|
||||
case feature::microphone:
|
||||
break;
|
||||
case feature::hand_tracking:
|
||||
if (not system.hand_tracking_supported())
|
||||
if (not application::get_hand_tracking_supported())
|
||||
return false;
|
||||
break;
|
||||
case feature::eye_gaze:
|
||||
@@ -104,12 +102,50 @@ bool configuration::check_feature(feature f) const
|
||||
return false;
|
||||
break;
|
||||
case feature::face_tracking:
|
||||
if (system.face_tracker_supported() == xr::face_tracker_type::none)
|
||||
return false;
|
||||
switch (guess_model())
|
||||
{
|
||||
case model::htc_vive_focus_3:
|
||||
case model::htc_vive_focus_vision:
|
||||
case model::htc_vive_xr_elite:
|
||||
if (not std::holds_alternative<xr::htc_face_tracker>(application::get_face_tracker()))
|
||||
return false;
|
||||
break;
|
||||
case model::pico_4_pro:
|
||||
case model::pico_4_enterprise:
|
||||
if (not std::holds_alternative<xr::pico_face_tracker>(application::get_face_tracker()))
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
if (not std::holds_alternative<xr::fb_face_tracker2>(application::get_face_tracker()))
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case feature::body_tracking:
|
||||
if (system.body_tracker_supported() == xr::body_tracker_type::none)
|
||||
return false;
|
||||
switch (guess_model())
|
||||
{
|
||||
case model::meta_quest_3:
|
||||
case model::meta_quest_3s:
|
||||
if (not std::holds_alternative<xr::fb_body_tracker>(application::get_body_tracker()))
|
||||
return false;
|
||||
break;
|
||||
case model::htc_vive_focus_3:
|
||||
case model::htc_vive_xr_elite:
|
||||
case model::htc_vive_focus_vision:
|
||||
if (not std::holds_alternative<xr::htc_body_tracker>(application::get_body_tracker()))
|
||||
return false;
|
||||
break;
|
||||
case model::pico_neo_3:
|
||||
case model::pico_4:
|
||||
case model::pico_4s:
|
||||
case model::pico_4_pro:
|
||||
case model::pico_4_enterprise:
|
||||
if (not std::holds_alternative<xr::pico_body_tracker>(application::get_body_tracker()))
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -145,8 +181,8 @@ void configuration::set_feature(feature f, bool state)
|
||||
|
||||
configuration::configuration(xr::system & system)
|
||||
{
|
||||
passthrough_enabled = system.passthrough_supported() == xr::passthrough_type::color;
|
||||
features[feature::hand_tracking] = system.hand_tracking_supported();
|
||||
passthrough_enabled = system.passthrough_supported() == xr::system::passthrough_type::color;
|
||||
features[feature::hand_tracking] = application::get_hand_tracking_supported();
|
||||
try
|
||||
{
|
||||
simdjson::dom::parser parser;
|
||||
@@ -178,9 +214,6 @@ configuration::configuration(xr::system & system)
|
||||
if (auto val = root["resolution_scale"]; val.is_double())
|
||||
resolution_scale = val.get_double();
|
||||
|
||||
if (auto val = root["enable_stream_gui"]; val.is_bool())
|
||||
enable_stream_gui = val.get_bool();
|
||||
|
||||
if (auto val = root["sgsr"]; val.is_object())
|
||||
parse_sgsr_options(val.get_object());
|
||||
|
||||
@@ -207,7 +240,7 @@ configuration::configuration(xr::system & system)
|
||||
features[i] = val.get_bool();
|
||||
}
|
||||
|
||||
if (system.passthrough_supported() == xr::passthrough_type::none)
|
||||
if (system.passthrough_supported() == xr::system::passthrough_type::no_passthrough)
|
||||
passthrough_enabled = false;
|
||||
|
||||
if (auto val = root["override_foveation_enable"]; val.is_bool())
|
||||
@@ -233,7 +266,7 @@ configuration::configuration(xr::system & system)
|
||||
resolution_scale = 1.4;
|
||||
sgsr = {};
|
||||
openxr_post_processing = {};
|
||||
passthrough_enabled = system.passthrough_supported() == xr::passthrough_type::color;
|
||||
passthrough_enabled = system.passthrough_supported() == xr::system::passthrough_type::color;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -332,7 +365,6 @@ void configuration::save()
|
||||
json << ",\"mic_unprocessed_audio\":" << std::boolalpha << mic_unprocessed_audio;
|
||||
json << ",\"fb_lower_body\":" << std::boolalpha << fb_lower_body;
|
||||
json << ",\"fb_hip\":" << std::boolalpha << fb_hip;
|
||||
json << ",\"enable_stream_gui\":" << std::boolalpha << enable_stream_gui;
|
||||
for (auto & [key, value]: features)
|
||||
json << "," << key << ":" << std::boolalpha << value;
|
||||
json << ",\"virtual_keyboard_layout\":" << json_string(virtual_keyboard_layout);
|
||||
|
||||
Reference in New Issue
Block a user