mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fix winit returning wrong window size
It seems like waiting for wgpu to create a instance is enough to make winit return the correct window size
This commit is contained in:
parent
e40702c083
commit
ef96ce68e6
@ -130,14 +130,14 @@ impl Renderer {
|
||||
// in doing this on rerender.
|
||||
// Self::enable_seamless_cube_maps(&mut device);
|
||||
|
||||
let dims = window.inner_size();
|
||||
|
||||
// TODO: fix panic on wayland with opengl?
|
||||
// TODO: fix backend defaulting to opengl on wayland.
|
||||
let instance = wgpu::Instance::new(
|
||||
wgpu::BackendBit::PRIMARY, /* | wgpu::BackendBit::SECONDARY */
|
||||
);
|
||||
|
||||
let dims = window.inner_size();
|
||||
|
||||
// This is unsafe because the window handle must be valid, if you find a way to
|
||||
// have an invalid winit::Window then you have bigger issues
|
||||
#[allow(unsafe_code)]
|
||||
|
Loading…
Reference in New Issue
Block a user