X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/afd5d91cae0ef66ac743ffb26c55e33af4735c0f..3678169caab0f713415414dce013a638305f3cce:/src/osx/core/glgrab.cpp diff --git a/src/osx/core/glgrab.cpp b/src/osx/core/glgrab.cpp index 99ffa2b085..669f2ba6c4 100644 --- a/src/osx/core/glgrab.cpp +++ b/src/osx/core/glgrab.cpp @@ -30,6 +30,8 @@ OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "wx/wxprec.h" + #if wxOSX_USE_COCOA_OR_CARBON #import @@ -37,6 +39,7 @@ #import #import +#include "wx/osx/core/private.h" #include "wx/osx/private/glgrab.h" extern CGColorSpaceRef wxMacGetGenericRGBColorSpace(); @@ -112,7 +115,6 @@ CGImageRef grabViaOpenGL(CGDirectDisplayID display, CGRect srcRect) void * data; long bytewidth; GLint width, height; - long bytes; CGLContextObj glContextObj; CGLPixelFormatObj pixelFormatObj ; @@ -154,7 +156,6 @@ CGImageRef grabViaOpenGL(CGDirectDisplayID display, CGRect srcRect) bytewidth = width * 4; // Assume 4 bytes/pixel for now bytewidth = (bytewidth + 3) & ~3; // Align to 4 bytes - bytes = bytewidth * height; // width * height /* Build bitmap context */ data = malloc(height * bytewidth);