diff options
| author | Manolo Gouy <Manolo> | 2017-07-07 14:31:40 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2017-07-07 14:31:40 +0000 |
| commit | 7847c2d87ab85b54f846f8ab240b5e866e9a6593 (patch) | |
| tree | 88d7687b30eeaad6681fa28e27a8c70b95f9970a /src/drivers | |
| parent | 22d90078bd81c94cc3b7dce4fd7ca000eed03087 (diff) | |
WIN32 HiDPI support: fix copy and paste of image data when rescaling is applied.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12297 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers')
| -rw-r--r-- | src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx | 4 |
1 files changed, 2 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 1a1152de5..3369545a4 100644 --- a/src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx +++ b/src/drivers/GDI/Fl_GDI_Copy_Surface_Driver.cxx @@ -62,10 +62,10 @@ Fl_GDI_Copy_Surface_Driver::Fl_GDI_Copy_Surface_Driver(int w, int h) : Fl_Copy_S // Global display scaling factor: 1, 1.25, 1.5, 1.75, etc... #ifdef FLTK_HIDPI_SUPPORT float scaling = Fl_Graphics_Driver::default_driver().scale(); + driver()->scale(scaling); #else - float scaling = ((Fl_WinAPI_Screen_Driver*)Fl::screen_driver())->DWM_scaling_factor(0); + float scaling = 1/((Fl_WinAPI_Screen_Driver*)Fl::screen_driver())->DWM_scaling_factor(0); #endif - driver()->scale(scaling); 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) { |
