diff options
| author | Manolo Gouy <Manolo> | 2017-06-18 16:01:53 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2017-06-18 16:01:53 +0000 |
| commit | 701fa00c7c54a1260f05ef41ee11592059d9f652 (patch) | |
| tree | e256811b8842ac1376e8b3730c42478162849eb0 /src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx | |
| parent | 2cda5a4fa682372f294a7a8e9e2b90a9fdb15610 (diff) | |
Advancing HiDPI support for the WIN32 platform - still incomplete.
It's still necessary to compile with -DFLTK_HIDPI_SUPPORT
to activate the new HiDPI support.
Default builds get the same HiDPI support as in FLTK 1.3
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12265 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx')
| -rw-r--r-- | src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx b/src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx index 1e7584fa8..e3d43664c 100644 --- a/src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx +++ b/src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx @@ -60,8 +60,13 @@ Fl_GDI_Copy_Surface_Driver::Fl_GDI_Copy_Surface_Driver(int w, int h) : Fl_Copy_S float factorw = (100.f * hmm) / hdots; float factorh = (100.f * vmm) / vdots; // Global display scaling factor: 1, 1.25, 1.5, 1.75, etc... - float scaling = Fl_WinAPI_Screen_Driver::desktop_scaling_factor(); - +#ifdef FLTK_HIDPI_SUPPORT + float scaling = Fl_Graphics_Driver::default_driver().scale(); + factorw *= scaling; + factorh *= scaling; +#else + float scaling = ((Fl_WinAPI_Screen_Driver*)Fl::screen_driver())->DWM_scaling_factor(0); +#endif RECT rect; rect.left = 0; rect.top = 0; rect.right = (LONG)((w/scaling) * factorw); rect.bottom = (LONG)((h/scaling) * factorh); gc = CreateEnhMetaFile (NULL, NULL, &rect, NULL); if (gc != NULL) { |
