X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03647350fc7cd141953c72e0284e928847d30f44..9e2e5d0759966cdcdb7dd1ffcae65e359e447e89:/src/osx/core/glgrab.cpp diff --git a/src/osx/core/glgrab.cpp b/src/osx/core/glgrab.cpp index ccb2ff76ad..669f2ba6c4 100644 --- a/src/osx/core/glgrab.cpp +++ b/src/osx/core/glgrab.cpp @@ -30,11 +30,16 @@ OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "wx/wxprec.h" + +#if wxOSX_USE_COCOA_OR_CARBON + #import #import #import #import +#include "wx/osx/core/private.h" #include "wx/osx/private/glgrab.h" extern CGColorSpaceRef wxMacGetGenericRGBColorSpace(); @@ -110,7 +115,6 @@ CGImageRef grabViaOpenGL(CGDirectDisplayID display, CGRect srcRect) void * data; long bytewidth; GLint width, height; - long bytes; CGLContextObj glContextObj; CGLPixelFormatObj pixelFormatObj ; @@ -152,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); @@ -212,3 +215,4 @@ CGImageRef grabViaOpenGL(CGDirectDisplayID display, CGRect srcRect) return image; } +#endif