mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-27 03:56:33 +11:00
Discourage use of WaitUntil to implement VSync (#2230)
This commit is contained in:
parent
6c1d3c4fd8
commit
2ae12fb0a0
1 changed files with 4 additions and 0 deletions
|
@ -140,6 +140,10 @@ pub enum ControlFlow {
|
||||||
Wait,
|
Wait,
|
||||||
/// When the current loop iteration finishes, suspend the thread until either another event
|
/// When the current loop iteration finishes, suspend the thread until either another event
|
||||||
/// arrives or the given time is reached.
|
/// arrives or the given time is reached.
|
||||||
|
///
|
||||||
|
/// Useful for implementing efficient timers. Applications which want to render at the display's
|
||||||
|
/// native refresh rate should instead use `Poll` and the VSync functionality of a graphics API
|
||||||
|
/// to reduce odds of missed frames.
|
||||||
WaitUntil(Instant),
|
WaitUntil(Instant),
|
||||||
/// Send a `LoopDestroyed` event and stop the event loop. This variant is *sticky* - once set,
|
/// Send a `LoopDestroyed` event and stop the event loop. This variant is *sticky* - once set,
|
||||||
/// `control_flow` cannot be changed from `ExitWithCode`, and any future attempts to do so will
|
/// `control_flow` cannot be changed from `ExitWithCode`, and any future attempts to do so will
|
||||||
|
|
Loading…
Add table
Reference in a new issue