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:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user