fix: compiling without the wayland feature
Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
@@ -28,7 +28,6 @@ pub enum ServerError {
|
|||||||
DeserializationError(#[from] DeserializationError),
|
DeserializationError(#[from] DeserializationError),
|
||||||
#[error("Reader error: {0}")]
|
#[error("Reader error: {0}")]
|
||||||
ReaderError(#[from] ReaderError),
|
ReaderError(#[from] ReaderError),
|
||||||
#[cfg(feature = "wayland")]
|
|
||||||
#[error("Aspect {} does not exist for node", 0.to_string())]
|
#[error("Aspect {} does not exist for node", 0.to_string())]
|
||||||
NoAspect(TypeId),
|
NoAspect(TypeId),
|
||||||
#[error("{0}")]
|
#[error("{0}")]
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ use tracing::{error, info};
|
|||||||
use tracing_subscriber::filter::Directive;
|
use tracing_subscriber::filter::Directive;
|
||||||
use tracing_subscriber::{EnvFilter, fmt, prelude::*};
|
use tracing_subscriber::{EnvFilter, fmt, prelude::*};
|
||||||
use tracking_offset::TrackingOffsetPlugin;
|
use tracking_offset::TrackingOffsetPlugin;
|
||||||
|
#[cfg(feature = "wayland")]
|
||||||
use wayland::{Wayland, WaylandPlugin};
|
use wayland::{Wayland, WaylandPlugin};
|
||||||
use zbus::Connection;
|
use zbus::Connection;
|
||||||
use zbus::fdo::ObjectManager;
|
use zbus::fdo::ObjectManager;
|
||||||
@@ -211,6 +212,7 @@ async fn main() -> Result<AppExit, JoinError> {
|
|||||||
|
|
||||||
let object_registry = ObjectRegistry::new(&dbus_connection).await;
|
let object_registry = ObjectRegistry::new(&dbus_connection).await;
|
||||||
|
|
||||||
|
#[cfg(feature = "wayland")]
|
||||||
let _wayland = Wayland::new().expect("Couldn't create Wayland instance");
|
let _wayland = Wayland::new().expect("Couldn't create Wayland instance");
|
||||||
|
|
||||||
let ready_notifier = Arc::new(Notify::new());
|
let ready_notifier = Arc::new(Notify::new());
|
||||||
@@ -438,7 +440,9 @@ fn bevy_loop(
|
|||||||
// object plugins
|
// object plugins
|
||||||
app.add_plugins((PlaySpacePlugin, HandPlugin, ControllerPlugin, HmdPlugin));
|
app.add_plugins((PlaySpacePlugin, HandPlugin, ControllerPlugin, HmdPlugin));
|
||||||
// feature plugins
|
// feature plugins
|
||||||
app.add_plugins((WaylandPlugin, TrackingOffsetPlugin, FieldDebugGizmoPlugin));
|
#[cfg(feature = "wayland")]
|
||||||
|
app.add_plugins(WaylandPlugin);
|
||||||
|
app.add_plugins((TrackingOffsetPlugin, FieldDebugGizmoPlugin));
|
||||||
app.add_systems(PostStartup, move || {
|
app.add_systems(PostStartup, move || {
|
||||||
ready_notifier.notify_waiters();
|
ready_notifier.notify_waiters();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user