mirror of
https://github.com/emilk/egui.git
synced 2026-09-03 07:10:04 -04:00
Use cfg attribute (#3113)
This commit is contained in:
@@ -144,11 +144,13 @@ fn run_and_return(
|
|||||||
// Platform-dependent event handlers to workaround a winit bug
|
// Platform-dependent event handlers to workaround a winit bug
|
||||||
// See: https://github.com/rust-windowing/winit/issues/987
|
// See: https://github.com/rust-windowing/winit/issues/987
|
||||||
// See: https://github.com/rust-windowing/winit/issues/1619
|
// See: https://github.com/rust-windowing/winit/issues/1619
|
||||||
winit::event::Event::RedrawEventsCleared if cfg!(windows) => {
|
#[cfg(windows)]
|
||||||
|
winit::event::Event::RedrawEventsCleared => {
|
||||||
next_repaint_time = extremely_far_future();
|
next_repaint_time = extremely_far_future();
|
||||||
winit_app.run_ui_and_paint()
|
winit_app.run_ui_and_paint()
|
||||||
}
|
}
|
||||||
winit::event::Event::RedrawRequested(_) if !cfg!(windows) => {
|
#[cfg(not(windows))]
|
||||||
|
winit::event::Event::RedrawRequested(_) => {
|
||||||
next_repaint_time = extremely_far_future();
|
next_repaint_time = extremely_far_future();
|
||||||
winit_app.run_ui_and_paint()
|
winit_app.run_ui_and_paint()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user