From 3a869aa5db2b9b603dcd3464fd4463e7ae74b3c1 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Tue, 21 Apr 2020 07:38:46 +0200 Subject: [PATCH] Fix pixel vs points bug in logical screen size of glium window --- example_glium/src/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/example_glium/src/main.rs b/example_glium/src/main.rs index 6413b119..2055d383 100644 --- a/example_glium/src/main.rs +++ b/example_glium/src/main.rs @@ -56,8 +56,7 @@ fn main() { glutin::WindowEvent::CloseRequested => quit = true, glutin::WindowEvent::Resized(glutin::dpi::LogicalSize { width, height }) => { - raw_input.screen_size = - vec2(width as f32, height as f32) / pixels_per_point; + raw_input.screen_size = vec2(width as f32, height as f32); } glutin::WindowEvent::MouseInput { state, .. } => { raw_input.mouse_down = state == glutin::ElementState::Pressed;