mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Proper fix for winit / cpal conflict
This commit is contained in:
parent
29c877cff3
commit
8cd2207495
@ -496,14 +496,19 @@ impl Window {
|
||||
|
||||
let size = settings.graphics.window_size;
|
||||
|
||||
let win_builder = glutin::window::WindowBuilder::new()
|
||||
let win_builder = winit::window::WindowBuilder::new()
|
||||
.with_title("Veloren")
|
||||
.with_inner_size(glutin::dpi::LogicalSize::new(
|
||||
size[0] as f64,
|
||||
size[1] as f64,
|
||||
))
|
||||
.with_inner_size(winit::dpi::LogicalSize::new(size[0] as f64, size[1] as f64))
|
||||
.with_maximized(true);
|
||||
|
||||
// Avoid cpal / winit OleInitialize conflict
|
||||
// See: https://github.com/rust-windowing/winit/pull/1524
|
||||
#[cfg(target_os = "windows")]
|
||||
let win_builder = winit::platform::windows::WindowBuilderExtWindows::with_drag_and_drop(
|
||||
win_builder,
|
||||
false,
|
||||
);
|
||||
|
||||
let (window, device, factory, win_color_view, win_depth_view) =
|
||||
glutin::ContextBuilder::new()
|
||||
.with_gl(glutin::GlRequest::Specific(glutin::Api::OpenGl, (3, 2)))
|
||||
|
Loading…
Reference in New Issue
Block a user