Skip to content

Commit

Permalink
Enable/disabled passthrough layer at runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
zmerp committed Jan 31, 2025
1 parent 8cbf0a1 commit 8d9f0d4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions alvr/client_openxr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,12 @@ pub fn entry_point() {
}
}
ClientCoreEvent::RealTimeConfig(config) => {
if config.passthrough.is_some() && passthrough_layer.is_none() {
passthrough_layer = PassthroughLayer::new(&xr_session).ok();
} else if config.passthrough.is_none() && passthrough_layer.is_some() {
passthrough_layer = None;
}

if let Some(stream) = &mut stream_context {
stream.update_real_time_config(&config);
}
Expand Down

0 comments on commit 8d9f0d4

Please sign in to comment.