scale debug overlay based on current dpi settings

Depending on the dpi settings, the debug overlay was almost unreadable.
I also took the liberty to refactor some redundant client size calls and to add some margin to the left of the debug text.
This commit is contained in:
Megamouse 2021-05-26 00:16:24 +02:00
parent 44f0ca08e2
commit 83d3658ef0
8 changed files with 62 additions and 31 deletions

View file

@ -400,6 +400,11 @@ int gs_frame::client_height()
return height() * devicePixelRatio();
}
double gs_frame::client_device_pixel_ratio() const
{
return devicePixelRatio();
}
void gs_frame::flip(draw_context_t, bool /*skip_frame*/)
{
static Timer fps_t;