kunitoki / yup

YUP is an open-source library dedicated to empowering developers with advanced tools for cross-platform application development.
Other
56 stars 6 forks source link

Fixes crash at startup related to height/width passed as 0 on screens with custom scaling #21

Closed dikadk closed 2 months ago

dikadk commented 2 months ago

This change fixes issue for me. Looks like glfwSetWindowSize doesn't take 0 and fails to calculate scale.

On my machine topMargin is 28px, so math: 0 - 28 - 0 = -28. with max = 0.

Screenshot 2024-09-20 at 2 23 28 PM Screenshot 2024-09-20 at 2 23 14 PM