WayVR: Fix process launching calling create_display two times

This commit is contained in:
Aleksander
2025-01-12 16:30:07 +01:00
parent eb3087f230
commit de6c5b8ad9
9 changed files with 35 additions and 16 deletions

View File

@@ -440,19 +440,22 @@ where
});
}
}
wayvr::TickTask::NewDisplay(cpar) => {
wayvr::TickTask::NewDisplay(cpar, disp_handle) => {
log::info!("Creating new display with name \"{}\"", cpar.name);
let mut wayvr = r_wayvr.borrow_mut();
let unique_name = wayvr.get_unique_display_name(cpar.name);
let disp_handle = wayvr.data.state.create_display(
cpar.width,
cpar.height,
&unique_name,
false,
)?;
let disp_handle = match disp_handle {
Some(d) => d,
None => wayvr.data.state.create_display(
cpar.width,
cpar.height,
&unique_name,
false,
)?,
};
wayvr.overlays_to_create.push(OverlayToCreate {
disp_handle,