diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2021-04-16 09:30:46 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2021-04-16 09:31:02 +0200 |
| commit | cacaa1749991178a58768ea437d9b8fbb779b0b4 (patch) | |
| tree | 61d005f5f7408e1b07d277876c65bc4de1b38e01 /src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx | |
| parent | 41b1f1f91197b40b243b6a0b38cc36ff3bc824fe (diff) | |
Minor simplification in Fl_Gl_Window_Driver::capture_gl_rectangle()
Diffstat (limited to 'src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx')
| -rw-r--r-- | src/drivers/OpenGL/Fl_OpenGL_Display_Device.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
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); } |
