Skip to content

Commit

Permalink
fix: headless build doesn't work as debug-ui feature flag doesn't rem…
Browse files Browse the repository at this point in the history
…ove implementation
  • Loading branch information
maxjoehnk committed Sep 14, 2023
1 parent 145353e commit 53e262c
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,23 @@ pub fn build_runtime(
.context("Failed to register midi module")?;
if let Err(err) = handle.block_on(register_wgpu_module(&mut runtime)) {
log::warn!("Failed to register gpu module, video nodes unavailable.\n{err:?}");
} else if cfg!(feature = "debug-ui") {
if let Some(debug_ui) = flags
.debug
.then(|| EguiDebugUi::new(runtime.injector().get().unwrap()))
.and_then(|ui| match ui {
Ok(ui) => Some(ui),
Err(err) => {
log::error!("Debug UI is not available: {err:?}");

None
}
})
} else {
#[cfg(feature = "debug-ui")]
{
runtime.setup_debug_ui(debug_ui);
if let Some(debug_ui) = flags
.debug
.then(|| EguiDebugUi::new(runtime.injector().get().unwrap()))
.and_then(|ui| match ui {
Ok(ui) => Some(ui),
Err(err) => {
log::error!("Debug UI is not available: {err:?}");

None
}
})
{
runtime.setup_debug_ui(debug_ui);
}
}
}
let (fixture_manager, fixture_library) =
Expand Down

0 comments on commit 53e262c

Please sign in to comment.