From d1c7caec3bf726ac137566ced91d067591a71e7e Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Wed, 2 Dec 2020 14:39:37 +0100 Subject: Improve Fl_Graphics_Driver::cache_size() when GUI is scaled. The change lets this function enlarge the size only when strictly necessary for image tiling. --- src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx') diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx index 659113c3c..998d4f9b9 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx +++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx @@ -503,7 +503,7 @@ Fl_WinAPI_Screen_Driver::read_win_rectangle( int ws, hs; if (int(s) == s) { ws = w * s; hs = h * s;} else { - ws = (w+1)*s; // matches what Fl_Graphics_Driver::cache_size() does + ws = (w+1)*s; // approximates what Fl_Graphics_Driver::cache_size() does hs = (h+1)*s; if (ws < 1) ws = 1; if (hs < 1) hs = 1; -- cgit v1.2.3