mirror of
https://github.com/bevyengine/bevy
synced 2025-01-03 00:38:56 +00:00
16 lines
777 B
Rust
16 lines
777 B
Rust
|
/// A resource for configuring usage of the `rust_winit` library.
|
||
|
#[derive(Default)]
|
||
|
pub struct WinitConfig {
|
||
|
/// Configures the winit library to return control to the main thread after
|
||
|
/// the [run](bevy_app::App::run) loop is exited. Winit strongly recommends
|
||
|
/// avoiding this when possible. Before using this please read and understand
|
||
|
/// the [caveats](winit::platform::desktop::EventLoopExtDesktop::run_return)
|
||
|
/// in the winit documentation.
|
||
|
///
|
||
|
/// This feature is only available on desktop `target_os` configurations.
|
||
|
/// Namely `windows`, `macos`, `linux`, `dragonfly`, `freebsd`, `netbsd`, and
|
||
|
/// `openbsd`. If set to true on an unsupported platform
|
||
|
/// [run](bevy_app::App::run) will panic.
|
||
|
pub return_from_run: bool,
|
||
|
}
|