From fe4fac8133e1b0fdea1e8a8abbb0f50c0a8c6903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Dallaire=20C=C3=B4t=C3=A9?= <110583667+0mdc@users.noreply.github.com> Date: Tue, 30 Jan 2024 16:07:55 -0500 Subject: [PATCH] Fix debug viewport calculation size. (#1777) --- habitat-hitl/habitat_hitl/core/hitl_main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/habitat-hitl/habitat_hitl/core/hitl_main.py b/habitat-hitl/habitat_hitl/core/hitl_main.py index a49759abc9..31efe1b24f 100644 --- a/habitat-hitl/habitat_hitl/core/hitl_main.py +++ b/habitat-hitl/habitat_hitl/core/hitl_main.py @@ -68,6 +68,9 @@ def hitl_headed_main(hitl_config, app_config, create_app_state_lambda): ReplayGuiAppRenderer, ) + assert hitl_config.window.width > 0 + assert hitl_config.window.height > 0 + glfw_config = Application.Configuration() glfw_config.title = hitl_config.window.title glfw_config.size = (hitl_config.window.width, hitl_config.window.height) @@ -76,8 +79,8 @@ def hitl_headed_main(hitl_config, app_config, create_app_state_lambda): framebuffer_size = gui_app_wrapper.get_framebuffer_size() viewport_multiplier = ( - framebuffer_size.x // hitl_config.window.width, - framebuffer_size.y // hitl_config.window.height, + framebuffer_size.x / hitl_config.window.width, + framebuffer_size.y / hitl_config.window.height, ) (