1
0
Fork 0
mirror of https://github.com/italicsjenga/muda.git synced 2025-01-11 12:21:30 +11:00

fix(example): replace deprecated EventLoopExtMacOS with EventLoopBuilderExtMacOS ()

This commit is contained in:
Jason Tsai 2022-06-21 22:19:42 +08:00 committed by GitHub
parent 5c1b220cbb
commit 28ffd206fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,6 @@
use muda::{menu_event_receiver, Menu, NativeMenuItem};
#[cfg(target_os = "macos")]
use winit::platform::macOS::EventLoopExtMacOS;
use winit::platform::macos::EventLoopBuilderExtMacOS;
#[cfg(target_os = "windows")]
use winit::platform::windows::{EventLoopBuilderExtWindows, WindowExtWindows};
use winit::{
@ -26,11 +26,11 @@ fn main() {
}
});
}
#[cfg(target_os = "macos")]
event_loop_builder.with_default_menu(false);
#[allow(unused_mut)]
let mut event_loop = event_loop_builder.build();
#[cfg(target_os = "macos")]
event_loop.enable_default_menu_creation(false);
let window = WindowBuilder::new().build(&event_loop).unwrap();
let _window2 = WindowBuilder::new().build(&event_loop).unwrap();