diff --git a/src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx b/src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx index 27360ccee..121c0dba4 100644 --- a/src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx +++ b/src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx @@ -58,8 +58,7 @@ Fl_RGB_Image* Fl_Gl_Window_Driver::capture_gl_rectangle(int x, int y, int w, int glPixelStorei(GL_PACK_SKIP_ROWS, 0); glPixelStorei(GL_PACK_SKIP_PIXELS, 0); // - int ns = Fl_Window_Driver::driver(glw)->screen_num(); - float s = Fl::screen_driver()->scale(ns); + float s = glw->pixels_per_unit(); if (s != 1) { x = int(x * s); y = int(y * s); w = int(w * s); h = int(h * s); }