1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 13:50:04 -04:00

Fix wrong detection of OS (#3238)

We had a bunch of `cfg!(windows)` and `cfg!(macos)` which should
have been `cfg!(target_os = "windows")`.

I wonder what the effects of this PR will be fore Windows 😬
This commit is contained in:
Emil Ernerfeldt
2023-08-12 13:50:31 +02:00
committed by GitHub
parent 98087029e0
commit 6633ecce64
4 changed files with 13 additions and 13 deletions

View File

@@ -200,8 +200,8 @@ fn main() {
// 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/1619
winit::event::Event::RedrawEventsCleared if cfg!(windows) => redraw(),
winit::event::Event::RedrawRequested(_) if !cfg!(windows) => redraw(),
winit::event::Event::RedrawEventsCleared if cfg!(target_os = "windows") => redraw(),
winit::event::Event::RedrawRequested(_) if !cfg!(target_os = "windows") => redraw(),
winit::event::Event::WindowEvent { event, .. } => {
use winit::event::WindowEvent;