summaryrefslogtreecommitdiff
path: root/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx')
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
index 219c1d1d6..e9ca9d2fb 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
+++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
@@ -617,6 +617,9 @@ Fl_WinAPI_Screen_Driver::read_win_rectangle(uchar *p, // I - Pixel buffer or NU
/** Returns the current desktop scaling factor (1.75 for example)
*/
float Fl_WinAPI_Screen_Driver::desktop_scaling_factor() {
+#ifdef FLTK_HIDPI_SUPPORT
+ return 1;// this becomes useless if FLTK app are made DPI-aware by calling SetProcessDpiAwareness()
+#else
// Compute the global desktop scaling factor: 1, 1.25, 1.5, 1.75, etc...
// This factor can be set in Windows 10 by
// "Change the size of text, apps and other items" in display settings.
@@ -636,6 +639,7 @@ float Fl_WinAPI_Screen_Driver::desktop_scaling_factor() {
float scaling = dhr/float(hr);
scaling = int(scaling * 100 + 0.5)/100.; // round to 2 digits after decimal point
return scaling;
+#endif // FLTK_HIDPI_SUPPORT
}
void Fl_WinAPI_Screen_Driver::offscreen_size(Fl_Offscreen off, int &width, int &height)