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