Skip to content

Commit

Permalink
switch all spans to debug_spans
Browse files Browse the repository at this point in the history
Signed-off-by: Schmarni <[email protected]>
  • Loading branch information
Schmarni-Dev committed Jan 1, 2025
1 parent 7c57e8f commit 336c40d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions crates/bevy_openxr/src/openxr/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -508,12 +508,13 @@ pub fn begin_xr_session(
world: &mut World,
// session: Res<OxrSession>, mut session_started: ResMut<OxrSessionStarted>
) {
let _span = info_span!("xr_begin_session").entered();
let _span = debug_span!("xr_begin_session").entered();
world
.get_resource::<OxrSession>()
.unwrap()
.begin(openxr::ViewConfigurationType::PRIMARY_STEREO)
.expect("Failed to begin session");
drop(_span);
world.get_resource_mut::<OxrSessionStarted>().unwrap().0 = true;
world.run_schedule(XrPostSessionBegin);
}
Expand All @@ -524,7 +525,7 @@ pub fn end_xr_session(
) {
// Maybe this could be an event?
world.run_schedule(XrPreSessionEnd);
let _span = info_span!("xr_end_session").entered();
let _span = debug_span!("xr_end_session").entered();
world
.get_resource::<OxrSession>()
.unwrap()
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_openxr/src/openxr/poll_events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ impl Plugin for OxrEventsPlugin {
}
/// Polls any OpenXR events and handles them accordingly
pub fn poll_events(world: &mut World) {
let _span = info_span!("xr_poll_events").entered();
let _span = debug_span!("xr_poll_events").entered();
let instance = world.resource::<OxrInstance>().clone();
let handlers = world.remove_resource::<OxrEventHandlers>().unwrap();
let mut buffer = EventDataBuffer::default();
Expand Down Expand Up @@ -54,7 +54,7 @@ pub struct OxrEvent {
impl OxrEvent {
pub(crate) fn new(event: Rc<RefCell<Option<Event<'_>>>>) -> Self {
Self {
#[allow(clippy::missing_transmute_annotations)]
#[allow(clippy::missing_transmute_annotations)]
event: unsafe { mem::transmute(event) },
}
}
Expand Down

0 comments on commit 336c40d

Please sign in to comment.