From d3b08c7e8bf808281e32fdef5e5222fb6633a5d0 Mon Sep 17 00:00:00 2001 From: ladevieq Date: Tue, 26 Jan 2021 22:27:44 +0100 Subject: Improve XCB keyboard inputs handling --- src/utils.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/utils.cpp') diff --git a/src/utils.cpp b/src/utils.cpp index 1c6fac1..3416714 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -91,8 +91,7 @@ void random_scene(sphere *world) { struct input_data create_inputs(uint32_t width, uint32_t height) { // Image dimensions - // const float aspect_ratio = 16.0 / 9.0; - const float aspect_ratio = 1; + const float aspect_ratio = (float)width / (float) height; const uint32_t samples_per_pixel = 1; const uint32_t max_depth = 2; -- cgit v1.3