pipewire pause/resume, update wlx-capture, pipewire dmabuf preps
This commit is contained in:
@@ -204,6 +204,10 @@ pub fn openxr_run(running: Arc<AtomicBool>) -> Result<(), BackendError> {
|
||||
}
|
||||
}
|
||||
|
||||
overlays
|
||||
.iter_mut()
|
||||
.for_each(|o| o.after_input(&mut app_state));
|
||||
|
||||
let (_, views) = xr_state
|
||||
.session
|
||||
.locate_views(
|
||||
|
||||
@@ -6,12 +6,14 @@ use super::{swapchain::SwapchainRenderData, transform_to_posef, XrState};
|
||||
use crate::{
|
||||
backend::{openxr::swapchain::create_swapchain_render_data, overlay::OverlayData},
|
||||
graphics::WlxCommandBuffer,
|
||||
state::AppState,
|
||||
};
|
||||
use vulkano::image::view::ImageView;
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct OpenXrOverlayData {
|
||||
last_view: Option<Arc<ImageView>>,
|
||||
last_visible: bool,
|
||||
pub(super) swapchain: Option<SwapchainRenderData>,
|
||||
pub(super) init: bool,
|
||||
}
|
||||
@@ -67,4 +69,15 @@ impl OverlayData<OpenXrOverlayData> {
|
||||
});
|
||||
Some(quad)
|
||||
}
|
||||
|
||||
pub(super) fn after_input(&mut self, app: &mut AppState) {
|
||||
if self.data.last_visible != self.state.want_visible {
|
||||
if self.state.want_visible {
|
||||
self.backend.resume(app);
|
||||
} else {
|
||||
self.backend.pause(app);
|
||||
}
|
||||
}
|
||||
self.data.last_visible = self.state.want_visible;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user