[BUG][PLAYER] DPI issues when built with Delphi 10.4?

Started by namida, November 09, 2021, 05:20:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

namida

My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

namida

Okay so, while I did find another bug in the process, I don't notice any issue myself. WillLem - can you clarify what the issue is? (Screenshots, perhaps, showing what happens in stable build vs what happens in the exp?)
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

WillLem

#2
When opening NeoLemmix normally, this is what I see:


System scaling

The experimental version appears like this (note that I have screenshotted more or less the same screen area as before):


Application scaling

Also note that these images have been greatly reduced in size for ease of comparison in this post.

Meanwhile, the F2 Menu is also different. Normally (for me), it appears like this, with the (preferred) old Windows system font:


System scaling

Whilst the experimental version appears like this, with a font which appears much crisper but is more difficult to read, and the icons are all clustered together in a smaller area, which seems incorrect (Note that, unfortunately, the screenshot fails to capture just how slim this writing appears on my screen, possibly due to resizing. So, I have attached the original screenshots below for better comparison):


Application scaling

I therefore have to set scaling to "System (Enhanced)" (in a 150% scaled environment) in order to get the desired result. The trade-off is that the game area and panel appear about 75% of the size that NeoLemmix is capable of displaying (and therefore becomes too big at 2 x Zoom) but since I mostly play windowed anyway this is never really a problem:


System scaling - How my play window appears at 1 x Zoom


System scaling - And again at 2 x Zoom - note that the level area is now too big to fit the window

Meanwhile, this is how the play area appears at 2 x Zoom when allowing NeoLemmix to do its own scaling:


Application scaling at 2 x Zoom - Note that the level now fits perfectly, and the panel is bigger

This is as it should be, of course, however the Menu now becomes much more difficult (for me) to read. I therefore prefer to use Windows scaling at the cost of (relatively) reducing the size of the level and panel (my full reasoning for this is listed at the end of this post).




So, to summarise as best as I can, I use the following Windows scaling settings:



This makes NeoLemmix bigger, so I can play at 1 x Zoom and have everything appear about 75% of what it is capable of at 2 x Zoom when NeoLemmix is doing its own scaling.

The experimental build forces its own scaling, so I have to set it to "System (Enhanced)," which was not necessary previously (i.e. leaving the Windows DPI setting unchecked resulted in System scaling anyway).

I hope that's as clear as I can make it. I'll try to clarify further if needs be.




My reasoning for preferring system scaling for NL, for curiosity's sake:

* Whilst the unzoomed panel at 150% appears about 75% smaller than the zoomed panel at 100%, this is fine for Windowed mode and I'm used to it by now
* Similarly, the 1 x Zoom level area at 150% appears about 75% smaller than the 2 x Zoom level area at 100%, which isn't ideal. However, it is fine for Windowed mode, particularly if I ever need to slightly reduce the size of the NL window for any reason
* 2 x Zoom is arguably more useful at 150% scaling than 3 x Zoom is at 100%
* The F2 Menu is far easier (for me) to read at 150% system scaling




namida

Okay, so based on Discord, and if I'm understanding correctly:

The main menu issue is just about window size. When using the system scaling setting, the window size difference is expected for the (otherwise) same settings - that's just because of the translation between NL's "DPI unaware" pixels (enabling those system scaling settings effectively turns it back into a DPI-unaware app, after all) and actual pixels on your screen. Furthermore, it seems that it's a matter of that when you replaced the EXE with the experimental one, the settings tied to the old EXE were overwritten but you just had to put them back - this is expected in general when replacing EXEs and there is nothing NeoLemmix can do about it (not even remember the setting in the config and restore it later, as from NeoLemmix's point of view this setting doesn't even exist; it's a Windows thing).

The second issue, with regard to icons being cramped together etc, is now a known bug - although it only became known while I was trying to investigate this.

The rest of this post appears to be general discussion about the merits vs drawbacks of your preferred settings, rather than any bug / unexpected behavior, so not really relevant to this topic going forward.

Please correct me if I'm understanding anything wrong here.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

WillLem

Yep, that's basically it.

The only thing that remains now is the fact that the menu font changes when NeoLemmix becomes DPI-aware. I'm not really sure why this happens, but it becomes very thin and difficult to read. Ironically, the font can now make use of more pixels at higher DPI, but for some reason uses less pixels and becomes a thinner, crisper font which all but disappears into the white background of the menu.

I've noticed this happening with various other programs and applications since laptops have become capable of higher and higher screen resolutions, tbf. It's not just a NeoLemmix thing. However, if it's something that can be fixed (i.e. perhaps by specifying a font for the menus) then that would be great.

namida

Menu font issue fixed in commit 1468023; backported to the 12.12 branch in commit 5f29bb2. All other issues noted in this topic seem to either be non-issues or outside of NeoLemmix's control, so I am now closing this one (and will use the other topic for further testing of any fixes / etc).
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)