Feature: Automatic UI and font zoom levels. #8537
General comment: Per previous IRC chat, apparently SDL (at least as currently used by us) has no concept of a HiDPI window, which means nothing to scale. On OSX, we currently force OS scaling, automatic zoom would only be a thing together with #8519.
Specific comments will be dealt with later.
For a moment I was thinking: maybe we shouldn't show the "auto" option for SDL, for example. But I realised ... nobody is going to care if there is an "auto" option in there, that doesn't do anything for their driver. They simply will not notice. So that is just extra work for no added benefit. So yeah, forget about all that, let's just make this a generic "feature" on which we should extend.
For example, SDL does have HiDPI support just fine, but we don't use it. There is a bit of work to do for us to support it, but not much. So we might as well. There are functions like
So I was thinking this would be simple, SDL is giving us a function, so how hard could it be? Well, for Windows, it is fine. But we of course mostly target Linux with SDL ... euh .. yeah ...
Someone worked out nicely how SDL behaves here, which you can read here:
And if we look in the SDL source, we found on X11
Long story short:
This would be similar to how Win32 driver now solves it, so that might be okay, but do we want to go that route, I wonder?
Use the same Windows XP target as for 64-bit. Current MSVC version will not produce a binary that works on anything earlier anyway.
The zoom level suggestion is based on the DPI scaling set in Windows. We use 150% scaling as the threshold for 2X zoom and 300% scaling as the threshold for 4X zoom.