Initial window size is slightly imperfect (not same as "reset window size" size)
Opened this issue · 1 comments
With current master (aba1558) on Ubuntu 18.04.3, when b-em starts up, the emulator window size is slightly "imperfect": if you look at the second ">" on the attached screenshot, you can see there isn't a 1-1 match of host to emulator pixels and there's some slight distortion:
If I then choose Settings->Video->Reset Window Size, the window shrinks slightly and the distortion goes away.
I'd have expected the initial window to be exactly the same size as the window after choosing "Reset Window Size".
For what it's worth, this is with display type "interlaced" and borders "none"; I haven't experimented to see if this is important or not.
Interestingly, when I try the same on ArchLinux that slight imperfection is not there. I suspect what is going on here is that on Ubuntu the font used for the menu is very slightly smaller. On Linux the window size reported by Allegro is of the whole window but the menu takes up part of the window. I subtract a value to allow for that but this is probably right for me and not quite right on Ubuntu. That in turn means the content area of the window is slighly larger on Ubuntu and looks like it has triggered upscaling.
As for why this is different after a "Reset Window Size" that is actually a cheat that goes through the motions of changing the border width using the same value as currently. Changing border width re-calculates the dimensions and then re-sizes the window to match those dimensions. When B-Em starts I don't believe it does that.
What we really need here is some way to query for the amount of space taken up by the menu.