fix dmabuf with openxr
This commit is contained in:
@@ -241,7 +241,7 @@ impl OverlayRenderer for ScreenRenderer {
|
||||
self.capture.resume();
|
||||
}
|
||||
fn view(&mut self) -> Option<Arc<ImageView>> {
|
||||
self.last_view.take()
|
||||
self.last_view.clone()
|
||||
}
|
||||
fn extent(&self) -> [u32; 3] {
|
||||
self.extent.clone()
|
||||
@@ -433,7 +433,7 @@ fn extent_from_res(res: (i32, i32)) -> [u32; 3] {
|
||||
// screens above a certain resolution will have severe aliasing
|
||||
|
||||
// TODO make dynamic. maybe don't go above HMD resolution?
|
||||
let w = res.0.min(2560) as u32;
|
||||
let w = res.0.min(1920) as u32;
|
||||
let h = (res.1 as f32 / res.0 as f32 * w as f32) as u32;
|
||||
[w, h, 1]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user