remove workaround for Monado zero-layers bug

This commit is contained in:
Sapphire 2026-03-20 18:35:26 -05:00
parent b0bbc25083
commit 1277bf4113
No known key found for this signature in database
GPG Key ID: 642911AA4025C8CC
1 changed files with 1 additions and 21 deletions

View File

@ -5,7 +5,6 @@ use std::{
time::{Duration, Instant},
};
use glam::{Affine3A, Vec3};
use input::OpenXrInputSource;
use openxr as xr;
use skybox::{Skybox, create_skybox};
@ -22,7 +21,7 @@ use crate::{
},
config::{save_settings, save_state},
graphics::{GpuFutures, init_openxr_graphics},
overlays::{toast::Toast, watch::WATCH_NAME},
overlays::toast::Toast,
state::AppState,
subsystem::notifications::NotificationManager,
windowing::{
@ -131,8 +130,6 @@ pub fn openxr_run(show_by_default: bool, headless: bool) -> Result<(), BackendEr
lines.allocate(&xr_state, &app)?,
];
let watch_id = overlays.lookup(WATCH_NAME).unwrap(); // want panic
let mut input_source = input::OpenXrInputSource::new(&xr_state)?;
let mut session_running = false;
@ -335,19 +332,6 @@ pub fn openxr_run(show_by_default: bool, headless: bool) -> Result<(), BackendEr
app.hid_provider.inner.commit();
let watch = overlays.mut_by_id(watch_id).unwrap(); // want panic
let watch_state = watch.config.active_state.as_mut().unwrap();
let watch_transform = watch_state.transform;
if watch_state.alpha < 0.05 {
//FIXME: Temporary workaround for Monado bug
watch_state.transform = Affine3A::from_scale(Vec3 {
x: 0.001,
y: 0.001,
z: 0.001,
});
watch_state.alpha = 0.02; // visible but not really. Monado freaks out if no layers are submitted.
}
if let Err(e) =
crate::ipc::events::tick_events::<OpenXrOverlayData>(&mut app, &mut overlays)
{
@ -493,10 +477,6 @@ pub fn openxr_run(show_by_default: bool, headless: bool) -> Result<(), BackendEr
}
delete_queue.retain(|(_, frame)| *frame > cur_frame);
//FIXME: Temporary workaround for Monado bug
let watch = overlays.mut_by_id(watch_id).unwrap(); // want panic
watch.config.active_state.as_mut().unwrap().transform = watch_transform;
} // main_loop
if let (Some(blocker), Some(monado)) = (blocker, app.monado.as_mut()) {