Have window default to half monitor width instead of half height

This commit is contained in:
Grant Sanderson 2022-09-13 11:46:33 -07:00
parent 69bb4f026c
commit 0c75d79080

View file

@ -394,10 +394,10 @@ def get_configuration(args):
mon_index = custom_config["window_monitor"]
monitor = monitors[min(mon_index, len(monitors) - 1)]
aspect_ratio = config["camera_config"]["pixel_width"] / config["camera_config"]["pixel_height"]
window_height = monitor.height
window_width = monitor.width
if not (args.full_screen or custom_config["full_screen"]):
window_height //= 2
window_width = int(window_height * aspect_ratio)
window_width //= 2
window_height = int(window_width / aspect_ratio)
config["window_config"] = {
"size": (window_width, window_height),
}