mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-23 22:01:31 +11:00
Reorganize EventLoopBuilder::build()
platform documentation
Since there's a "Platform-specific" header, it makes sense to put the Linux-specific part under it. On the other hand, "Can only be called on the main thread." is true for all platforms, not just iOS, so there is no reason to call it out for iOS specifically.
This commit is contained in:
parent
bcd76d4718
commit
f11270dac0
|
@ -84,14 +84,14 @@ impl<T> EventLoopBuilder<T> {
|
||||||
/// in the relevant `platform` module if the target platform supports creating an event loop on
|
/// in the relevant `platform` module if the target platform supports creating an event loop on
|
||||||
/// any thread.
|
/// any thread.
|
||||||
///
|
///
|
||||||
/// Usage will result in display backend initialisation, this can be controlled on linux
|
/// Calling this function will result in display backend initialisation.
|
||||||
/// using an environment variable `WINIT_UNIX_BACKEND`. Legal values are `x11` and `wayland`.
|
|
||||||
/// If it is not set, winit will try to connect to a wayland connection, and if it fails will
|
|
||||||
/// fallback on x11. If this variable is set with any other value, winit will panic.
|
|
||||||
///
|
///
|
||||||
/// ## Platform-specific
|
/// ## Platform-specific
|
||||||
///
|
///
|
||||||
/// - **iOS:** Can only be called on the main thread.
|
/// - **Linux:** Backend type can be controlled using an environment variable
|
||||||
|
/// `WINIT_UNIX_BACKEND`. Legal values are `x11` and `wayland`.
|
||||||
|
/// If it is not set, winit will try to connect to a Wayland connection, and if that fails,
|
||||||
|
/// will fall back on X11. If this variable is set with any other value, winit will panic.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn build(&mut self) -> EventLoop<T> {
|
pub fn build(&mut self) -> EventLoop<T> {
|
||||||
EventLoop {
|
EventLoop {
|
||||||
|
|
Loading…
Reference in a new issue