summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Gl_Device_Plugin.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Fl_Gl_Device_Plugin.cxx b/src/Fl_Gl_Device_Plugin.cxx
index 8dbdb297f..e9b43d1cf 100644
--- a/src/Fl_Gl_Device_Plugin.cxx
+++ b/src/Fl_Gl_Device_Plugin.cxx
@@ -53,8 +53,9 @@ static Fl_RGB_Image* capture_gl_rectangle(Fl_Gl_Window *glw, int x, int y, int w
{
#if defined(__APPLE__)
const int bytesperpixel = 4;
- if (Fl_X::resolution_scaling_factor(glw) > 1) {
- w = 2*w; h = 2*h; x = 2*x; y = 2*y;
+ int factor = Fl_X::resolution_scaling_factor(glw);
+ if (factor > 1) {
+ w *= factor; h *= factor; x *= factor; y *= factor;
}
#else
const int bytesperpixel = 3;