Jeremy Wilkins
Jeremy Wilkins
I should get a chance to test it around 18:00UTC. Busy with family right now.
That fixes it alright.
Although I'm pretty sure that patch is the wrong fix. Seems more like there is an issue with the calculated width to me.
I think I found the actual issue. it is with platform/screen.c in scale_logical_to_pixels(). That method doesn't handle the rounding properly.
Try changing the methods to include rounding and see if that fixes it. ``` static int scale_logical_to_pixels(int logical_value) { // Add 50 to force 0.5 rounding. return (logical_value * scale_percentage...
I disagree. Rounding half-way should not break other screen sizes.
Although, if there is a concern there maybe a few tests are needed to verify this is safe to change.
In effect what I am doing is close to a float 0.5 rounding method.
After doing all the calculations I realize what you are saying. I think using the second method gets the correct results. Using them together compounds rounding errors.
Try using just the scale_pixels_to_logical() modifications. It does seem like we need to preserve more decimals to get this right though even if they are stored as integers.