mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-28 15:43:13 -04:00
winit/event_loop: Add register_app and run_app_never_return
To allow users to explicitly choose the run semantics that they want.
This commit is contained in:
committed by
Kirill Chibisov
parent
c98d880a1c
commit
cc23fbf3be
@@ -39,9 +39,8 @@ impl EventLoop {
|
||||
EVENT_LOOP_CREATED.store(false, Ordering::Relaxed);
|
||||
}
|
||||
|
||||
pub fn run_app<A: ApplicationHandler + 'static>(self, app: A) -> Result<(), EventLoopError> {
|
||||
pub fn register_app<A: ApplicationHandler + 'static>(self, app: A) {
|
||||
self.elw.run(Box::new(app));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn window_target(&self) -> &dyn RootActiveEventLoop {
|
||||
|
||||
Reference in New Issue
Block a user