fix(input): don't unwrap on getting the string of a path, fixes crash sometimes experienced with handtracking

Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
Schmarni
2025-08-23 02:06:55 +02:00
parent 040f86d50d
commit 30f340fe41

View File

@@ -366,13 +366,13 @@ impl OxrControllerInput {
HandSide::Right => "/user/hand/right",
})
.unwrap();
if let Ok(path) = session.current_interaction_profile(path) {
if session.instance().path_to_string(path).unwrap()
== "/interaction_profiles/khr/simple_controller"
{
self.set_enabled(false);
}
if let Ok(path) = session.current_interaction_profile(path)
&& let Ok(path) = session.instance().path_to_string(path)
&& path == "/interaction_profiles/khr/simple_controller"
{
self.set_enabled(false);
}
fn get<T: openxr::ActionInput + Default>(
session: &OxrSession,
path: openxr::Path,