Skip to content

Commit

Permalink
Eye: Set 500x500 as default content area
Browse files Browse the repository at this point in the history
Pupil Cam1 uses 4:3 resolutions. Pupil Cam2 and Cam3 use 1:1 resolutions. As all Pupil Core and VR/AR add-ons are shipped with Pupil Cam2 and Cam3 cameras, we adjust the default eye window size to a 1:1 content aspect ratio. The size of 500 was chosen s.t. the menu still fits.
  • Loading branch information
papr committed Aug 3, 2020
1 parent dbd8043 commit b92d632
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pupil_src/launchables/eye.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,12 @@ def toggle_general_settings(collapsed):
glfw.glfwWindowHint(glfw.GLFW_VISIBLE, 0) # hide window
title = "Pupil Capture - eye {}".format(eye_id)

width, height = session_settings.get("window_size", (640 + icon_bar_width, 480))
# Pupil Cam1 uses 4:3 resolutions. Pupil Cam2 and Cam3 use 1:1 resolutions.
# As all Pupil Core and VR/AR add-ons are shipped with Pupil Cam2 and Cam3
# cameras, we adjust the default eye window size to a 1:1 content aspect ratio.
# The size of 500 was chosen s.t. the menu still fits.
default_window_size = 500 + icon_bar_width, 500
width, height = session_settings.get("window_size", default_window_size)

main_window = glfw.glfwCreateWindow(width, height, title, None, None)
window_pos = session_settings.get("window_position", window_position_default)
Expand Down

0 comments on commit b92d632

Please sign in to comment.