2020-08-21 05:37:19 +00:00
|
|
|
/// A resource for configuring usage of the `rust_winit` library.
|
2020-10-08 18:43:01 +00:00
|
|
|
#[derive(Debug, Default)]
|
2020-08-21 05:37:19 +00:00
|
|
|
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,
|
|
|
|
}
|