So uhhh remember in the last post where I said that I fixed the surface drawing for "practically any 16:9 resolutions"?
Well forget what I said, because today I didn't "just" fix it for 16:9, I ended up fixing it for virtually any aspect ratio.
How did this happen you ask? Well shortly after I've made this post I noticed that the "simple" border looked rather odd on some resolutions, particularly the "almost" 16/9 ones (i.e 1366x768, 1360x768, 960x544).
After a few trials and errors it finally hit me, the code that draws the borders background is heavily flawed.

Basically, it only takes the width as a scale factor and completely disregards the height. So for instance, let's take 1360x768, if you multiply the height by that scale, you'll get 1080 * 1360 / 1920, which is 765.
Fixing that was pretty straightforward, you just need to multiply the background height by (window_get_height() / 1080)
And uhhh, by doing that alone it ended up fixing it for every resolution imaginable. Don't believe me? here you go
1920x1200 (16:10)

1440x1080 (4:3)

2560x1080 (21:9)

And I could go on and on.
Now, I know what you're thinking but no, I didn't just take a screenshot and stretch it on photoshop. This is actually real.
What, you STILL don't believe me? Go and download version 1.13.19 and have fun tinkering with your screen resolution
Now I guess that "restoring the original resolution when selecting NONE" is no longer necessary, but before you pick up those pitchforks, I have actually added a workaround for those who'd still prefer to play without the borders, which is to launch the game with --no-borders
as a launch argument.
This can be done through Steam or via a shortcut on Windows like this.




0 comments