From 91d2bf4783fe46f2d46f851713f8ba2866aab68c Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Wed, 13 Mar 2024 18:02:13 +0100 Subject: Improve Fl_Wayland_Screen_Driver::base_scale(int) --- src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx index 2a0e08790..3b41bb1a5 100644 --- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx @@ -1878,7 +1878,12 @@ int Fl_Wayland_Screen_Driver::get_key(int k) { float Fl_Wayland_Screen_Driver::base_scale(int numscreen) { - return 1.f; + const char *p; + float factor = 1; + if ((p = fl_getenv("FLTK_SCALING_FACTOR"))) { + sscanf(p, "%f", &factor); + } + return factor; } -- cgit v1.2.3