Tempest icon indicating copy to clipboard operation
Tempest copied to clipboard

Need to take OS scale into account when calculating resolution

Open KirillAlekseeenko opened this issue 1 year ago • 1 comments

For example, on my machine I set 125% scale and can get only 864p instead of 1080p

On Windows 11 calling SetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT_SYSTEM_AWARE); before getting int w = GetSystemMetrics(SM_CXSCREEN), h = GetSystemMetrics(SM_CYSCREEN); works fine. But UI looks smaller and probably needs to be scaled up accordingly.

KirillAlekseeenko avatar Aug 19 '24 18:08 KirillAlekseeenko

Hi, @KirillAlekseeenko !

Dpi awareness is not implemented in engine, as I do not yet have consistent vision/idea on how engine-level api should look-like. Maybe we can keep it simple like on MacOS and provide a single getter for UI-scale; maybe it need to be complement with auto-scaling for Tempest::Widget or even Tempest::Painter.

However I must admit that problem running OpenGothic in HiDpi exist. For now only working solution would be to set INTERFACE Scale to value bigger than one, in SystemPack.ini file.

Try avatar Aug 24 '24 16:08 Try