Skip to content

Commit

Permalink
fix(client_openxr): 🐛 Fix blank flashes
Browse files Browse the repository at this point in the history
  • Loading branch information
zmerp committed Oct 17, 2024
1 parent 5199c95 commit d42701b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion alvr/client_openxr/src/interaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use alvr_common::{glam::Vec3, *};
use alvr_packets::{ButtonEntry, ButtonValue, ViewParams};
use alvr_session::{BodyTrackingSourcesConfig, FaceTrackingSourcesConfig};
use openxr as xr;
use std::{collections::HashMap, time::Duration};
use std::collections::HashMap;
use xr::SpaceLocationFlags;

const IPD_CHANGE_EPS: f32 = 0.001;
Expand Down
4 changes: 3 additions & 1 deletion alvr/client_openxr/src/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use alvr_common::{
use alvr_packets::{FaceData, StreamConfig, ViewParams};
use alvr_session::{
BodyTrackingSourcesConfig, ClientsideFoveationConfig, ClientsideFoveationMode, CodecType,
EncoderConfig, FaceTrackingSourcesConfig, FoveatedEncodingConfig, MediacodecDataType,
FaceTrackingSourcesConfig, FoveatedEncodingConfig, MediacodecDataType,
};
use openxr as xr;
use std::{
Expand Down Expand Up @@ -355,6 +355,8 @@ impl StreamContext {
let timestamp =
Duration::max(timestamp, vsync_time.saturating_sub(Duration::from_secs(1)));

self.last_good_view_params = view_params;

(timestamp, view_params, buffer_ptr)
} else {
(vsync_time, self.last_good_view_params, ptr::null_mut())
Expand Down

0 comments on commit d42701b

Please sign in to comment.