How does one fix the aspect ratio while resizing a window in glfw?

How do I maintain the aspect ratio set on creation when resizing my window in glfw? I tried searching for a guide/tutorial but I couldn’t find any answers as to how… I know it will be something inside a function passed to the glfw.set_window_size_callback function but what would that be?

See the Window Size limit section of the documentation:
https://www.glfw.org/docs/3.3/window_guide.html#window_sizelimits

Specifically glfwSetWindowAspectRatio.

1 Like

It works! Thanks so much!