summaryrefslogtreecommitdiff
path: root/src/drivers/WinAPI
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/WinAPI')
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H6
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx17
2 files changed, 10 insertions, 13 deletions
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H
index e28fb791a..b5d238ba9 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H
+++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.H
@@ -4,7 +4,7 @@
// Definition of MSWindows Win32/64 Screen interface
// for the Fast Light Tool Kit (FLTK).
//
-// Copyright 2010-2016 by Bill Spitzak and others.
+// Copyright 2010-2018 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -79,8 +79,8 @@ public:
virtual void remove_timeout(Fl_Timeout_Handler cb, void *argp);
virtual int dnd(int unused);
virtual int compose(int &del);
- virtual Fl_RGB_Image *read_win_rectangle(uchar *p, int X, int Y, int w, int h, int alpha);
- Fl_RGB_Image *read_win_rectangle_unscaled(uchar *p, int X, int Y, int w, int h, int alpha);
+ virtual Fl_RGB_Image *read_win_rectangle(int X, int Y, int w, int h);
+ Fl_RGB_Image *read_win_rectangle_unscaled(int X, int Y, int w, int h);
virtual int get_mouse(int &x, int &y);
virtual void enable_im();
virtual void disable_im();
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
index 9373d345d..f44fa7a3c 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
+++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
@@ -496,24 +496,21 @@ int Fl_WinAPI_Screen_Driver::compose(int &del) {
Fl_RGB_Image * // O - image or NULL if failed
-Fl_WinAPI_Screen_Driver::read_win_rectangle(uchar *p, // I - Pixel buffer or NULL to allocate
+Fl_WinAPI_Screen_Driver::read_win_rectangle(
int X, // I - Left position
int Y, // I - Top position
int w, // I - Width of area to read
- int h, // I - Height of area to read
- int alpha) // I - Alpha value for image (0 for none)
+ int h) // I - Height of area to read
{
float s = Fl_Surface_Device::surface()->driver()->scale();
- return read_win_rectangle_unscaled(p, X*s, Y*s, w*s, h*s, alpha);
+ return read_win_rectangle_unscaled(X*s, Y*s, w*s, h*s);
}
-Fl_RGB_Image *Fl_WinAPI_Screen_Driver::read_win_rectangle_unscaled(uchar *p, int X, int Y, int w, int h, int alpha)
+Fl_RGB_Image *Fl_WinAPI_Screen_Driver::read_win_rectangle_unscaled(int X, int Y, int w, int h)
{
- int d; // Depth of image
-
- // Allocate the image data array as needed...
- d = alpha ? 4 : 3;
-
+ int d = 3; // Depth of image
+ int alpha = 0; uchar *p = NULL;
+ // Allocate the image data array as needed...
const uchar *oldp = p;
if (!p) p = new uchar[w * h * d];