Minor simplification in Fl_Gl_Window_Driver::capture_gl_rectangle()

This commit is contained in:
ManoloFLTK 2021-04-16 09:30:46 +02:00
parent 41b1f1f911
commit cacaa17499

View File

@ -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);
}