Use bevy_app instead

This commit is contained in:
Florian RICHER 2025-04-24 13:05:38 +02:00
parent 8b0c59f7c0
commit a295093c97
Signed by: florian.richer
GPG key ID: C73D37CBED7BFC77
12 changed files with 98 additions and 79 deletions

View file

@ -1,10 +1,9 @@
use bevy_app::{App, AppExit};
use config::WindowConfig;
use raw_handle::{DisplayHandleWrapper, EventLoopProxyWrapper};
use state::WindowState;
use winit::event_loop::EventLoop;
use super::app::{App, AppExit};
pub mod config;
pub mod raw_handle;
pub mod state;
@ -43,6 +42,9 @@ fn runner(mut app: App, event_loop: EventLoop<()>) -> AppExit {
match event_loop.run_app(&mut window_state) {
Ok(_) => AppExit::Success,
Err(e) => AppExit::Error(Box::new(e)),
Err(e) => {
log::error!("Error running window state: {e}");
AppExit::error()
}
}
}