summaryrefslogtreecommitdiff
path: root/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2017-07-07 15:06:51 +0000
committerManolo Gouy <Manolo>2017-07-07 15:06:51 +0000
commit9f69df923fa4a672274c013f8969416f19925be8 (patch)
tree764c70b05fa00cd2d89a31b9597f48a628944567 /src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
parent7847c2d87ab85b54f846f8ab240b5e866e9a6593 (diff)
Define Fl_WinAPI_Screen_Driver::DWM_scaling_factor() only without FLTK_HIDPI_SUPPORT.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12298 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx')
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
index 5951ba193..0f0609bcc 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
+++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
@@ -630,12 +630,10 @@ Fl_RGB_Image *Fl_WinAPI_Screen_Driver::read_win_rectangle_unscaled(uchar *p, int
return rgb;
}
+#ifndef FLTK_HIDPI_SUPPORT
/* Returns the current desktop scaling factor for screen_num (1.75 for example)
*/
-float Fl_WinAPI_Screen_Driver::DWM_scaling_factor(int screen_num) {
-#ifdef FLTK_HIDPI_SUPPORT
- return scale(screen_num);
-#else
+float Fl_WinAPI_Screen_Driver::DWM_scaling_factor() {
// 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.
@@ -655,9 +653,10 @@ float Fl_WinAPI_Screen_Driver::DWM_scaling_factor(int screen_num) {
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
}
+#endif // ! FLTK_HIDPI_SUPPORT
+
void Fl_WinAPI_Screen_Driver::offscreen_size(Fl_Offscreen off, int &width, int &height)
{
BITMAP bitmap;