Don't call `.vulkan()` when building the SDL window on macOS (#541)

This appears to fix some (not all) of the problems that are mentioned in #466
macos-click-through
Benjamin Davies 4 years ago committed by GitHub
parent b816f7dfea
commit 5d98148b03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -432,14 +432,25 @@ pub fn start_loop(
.expect("Failed to create sdl video subsystem"); .expect("Failed to create sdl video subsystem");
video_subsystem.text_input().start(); video_subsystem.text_input().start();
let mut sdl_window = video_subsystem let mut sdl_window = if cfg!(target_os = "macos") {
.window("Neovide", logical_size.width, logical_size.height) video_subsystem
.position_centered() .window("Neovide", logical_size.width, logical_size.height)
.allow_highdpi() .position_centered()
.resizable() .allow_highdpi()
.vulkan() .resizable()
.build() // .vulkan() call emited as it causes errors on some systems
.expect("Failed to create window"); .build()
.expect("Failed to create window")
} else {
video_subsystem
.window("Neovide", logical_size.width, logical_size.height)
.position_centered()
.allow_highdpi()
.resizable()
.vulkan()
.build()
.expect("Failed to create window")
};
log::info!("window created"); log::info!("window created");
set_icon(&mut sdl_window); set_icon(&mut sdl_window);

Loading…
Cancel
Save