Use bevy_app instead
This commit is contained in:
parent
8b0c59f7c0
commit
a295093c97
12 changed files with 98 additions and 79 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue