refactor: move WaylandPlugin init
Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
@@ -290,8 +290,7 @@ fn bevy_loop(
|
||||
.add(AudioPlugin::default())
|
||||
.add(GizmoPlugin)
|
||||
.add(WindowPlugin::default())
|
||||
.add(DmabufImportPlugin)
|
||||
.add(WaylandPlugin);
|
||||
.add(DmabufImportPlugin);
|
||||
let mut task_pool_plugin = TaskPoolPlugin::default();
|
||||
// make tokio work
|
||||
let handle = tokio::runtime::Handle::current();
|
||||
@@ -395,6 +394,8 @@ fn bevy_loop(
|
||||
));
|
||||
// object plugins
|
||||
app.add_plugins((PlaySpacePlugin, HandPlugin, ControllerPlugin));
|
||||
// feature plugins
|
||||
app.add_plugins(WaylandPlugin);
|
||||
app.add_systems(PostStartup, move || {
|
||||
ready_notifier.notify_waiters();
|
||||
});
|
||||
|
||||
@@ -35,7 +35,7 @@ use std::{
|
||||
};
|
||||
use tokio::{net::UnixStream, sync::mpsc, task::AbortHandle};
|
||||
use tokio_stream::StreamExt;
|
||||
use tracing::{debug_span, instrument};
|
||||
use tracing::{debug_span, info, instrument};
|
||||
use waynest::server::protocol::stable::linux_dmabuf_v1::zwp_linux_buffer_params_v1::ZwpLinuxBufferParamsV1;
|
||||
use waynest::{
|
||||
server::{
|
||||
@@ -295,6 +295,7 @@ impl Plugin for WaylandPlugin {
|
||||
}
|
||||
|
||||
fn early_frame() {
|
||||
info!("test");
|
||||
for buffer in WL_BUFFER_REGISTRY.get_valid_contents() {
|
||||
if buffer.rendered.load(Ordering::Relaxed) {
|
||||
let _ = buffer
|
||||
|
||||
Reference in New Issue
Block a user