Skip to content

Commit

Permalink
Fix debug viewport calculation size. (facebookresearch#1777)
Browse files Browse the repository at this point in the history
  • Loading branch information
0mdc authored Jan 30, 2024
1 parent 05cfe27 commit fe4fac8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions habitat-hitl/habitat_hitl/core/hitl_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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,
)

(
Expand Down

0 comments on commit fe4fac8

Please sign in to comment.