Skip to content

Commit

Permalink
Don't call .vulkan() when building the SDL window on macOS (#541)
Browse files Browse the repository at this point in the history
This appears to fix some (not all) of the problems that are mentioned in #466
  • Loading branch information
Benjamin-Davies committed Apr 12, 2021
1 parent b816f7d commit 5d98148
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions src/window/sdl2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,14 +432,25 @@ pub fn start_loop(
.expect("Failed to create sdl video subsystem");
video_subsystem.text_input().start();

let mut sdl_window = video_subsystem
.window("Neovide", logical_size.width, logical_size.height)
.position_centered()
.allow_highdpi()
.resizable()
.vulkan()
.build()
.expect("Failed to create window");
let mut sdl_window = if cfg!(target_os = "macos") {
video_subsystem
.window("Neovide", logical_size.width, logical_size.height)
.position_centered()
.allow_highdpi()
.resizable()
// .vulkan() call emited as it causes errors on some systems
.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");

set_icon(&mut sdl_window);
Expand Down

0 comments on commit 5d98148

Please sign in to comment.