Open mkilgore opened 2 years ago
If you do a metacommand, just replace the call I'm making and use SetProcessDPIAwarenessContext
and pass in DPI_AWARENESS_CONTEXT_SYSTEM_AWARE
for ON and DPI_AWARENESS_CONTEXT_UNAWARE
for OFF. This actually only is available in Windows 10 1607 so you'd need to use a previously available function version.
DPI Awareness allows a program to indicate to the OS that it can handle properly scaling itself to be usable on a high DPI screen (where normal text would otherwise be much too small to read). QB64-PE programs are currently DPI unaware, which allows the system to simply scale the programs for us, but it also limits the resolution programs can use in the presence of scaling.
The basics of this likely involve providing a command like
$DPIAWARE:[YES|NO]
to mark a program DPI aware, and then also a way to receive any updates to the current DPI similar to window resizes. Other functionality that makes it easier to deal with, such as the ability to scale the screen from within QB64-PE, could also be considered.