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