summaryrefslogtreecommitdiff
path: root/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2018-03-09 16:27:27 +0000
committerManolo Gouy <Manolo>2018-03-09 16:27:27 +0000
commit7f78b1ef1468bb8242fb7fb37e3f27d0a8052ce1 (patch)
tree517c45c18c7dc28f8d3a05662a75497c408c1dbe /src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
parent12f628514771294102d2aa961373373a95ddab6b (diff)
Windows: remove necessity to compile with -DFLTK_HIDPI_SUPPORT to make WIN32 FLTK apps DPI-aware.
At this point, Windows FLTK apps detect HighDPI displays and rescale their GUI accordingly. They also all reply to ctrl/+/-/0/ keystrokes to enlarge/shrink/reset their windows. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12723 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.cxx26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
index 4521038f0..a675d1620 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
+++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
@@ -600,32 +600,6 @@ Fl_RGB_Image *Fl_WinAPI_Screen_Driver::read_win_rectangle_unscaled(int X, int Y,
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() {
- // 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.
- // We don't cache this value because it can change while the app is running.
- HDC hdc = GetDC(NULL);
- int hr = GetDeviceCaps(hdc, HORZRES); // pixels visible to the app
-#ifndef DESKTOPHORZRES
-#define DESKTOPHORZRES 118
- /* As of 27 august 2016, the DESKTOPHORZRES flag for GetDeviceCaps()
- has disappeared from Microsoft online doc, but is quoted in numerous coding examples
- e.g., https://social.msdn.microsoft.com/Forums/en-US/6acc3b21-23a4-4a00-90b4-968a43e1ccc8/capture-screen-with-high-dpi?forum=vbgeneral
- It is necessary for the computation of the scaling factor at runtime as done here.
- */
-#endif
- int dhr = GetDeviceCaps(hdc, DESKTOPHORZRES); // true number of pixels on display
- ReleaseDC(NULL, hdc);
- 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)
{