summaryrefslogtreecommitdiffstats
path: root/src/multimedia
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@nokia.com>2010-04-08 09:25:29 (GMT)
committerMorten Johan Sørvig <morten.sorvig@nokia.com>2010-04-08 09:30:26 (GMT)
commitb35ca43b5a091420825254e547e63cc9aa73dded (patch)
treefc5b7b55f5746af47e88aac77e8979072f9512b7 /src/multimedia
parent622e9dba125683106f2c5e2578bb72d134fab2a8 (diff)
downloadQt-b35ca43b5a091420825254e547e63cc9aa73dded.zip
Qt-b35ca43b5a091420825254e547e63cc9aa73dded.tar.gz
Qt-b35ca43b5a091420825254e547e63cc9aa73dded.tar.bz2
Compile on 10.4.
(include gl.h, NSBitmapImageRep::CGImage is 10.5+ only) This commmit simply ommits calling DrawImage when compiling or running on 10.4 - clearly not the correct thing to do if we want to support Tiger.
Diffstat (limited to 'src/multimedia')
-rw-r--r--src/multimedia/base/qpaintervideosurface_mac.mm9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/multimedia/base/qpaintervideosurface_mac.mm b/src/multimedia/base/qpaintervideosurface_mac.mm
index ee03990..1154f86 100644
--- a/src/multimedia/base/qpaintervideosurface_mac.mm
+++ b/src/multimedia/base/qpaintervideosurface_mac.mm
@@ -53,6 +53,7 @@
#include <QuartzCore/CIContext.h>
#include <CGLCurrent.h>
+#include <gl.h>
QT_BEGIN_NAMESPACE
@@ -147,11 +148,19 @@ QAbstractVideoSurface::Error QVideoSurfaceCoreGraphicsPainter::paint(
CGContextTranslateCTM(cgContext, 0, dRect.origin.y + CGRectGetMaxY(dRect));
CGContextScaleCTM(cgContext, 1, -1);
+#if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_4)
+ if (QSysInfo::MacintoshVersion > QSysInfo::MV_10_4) {
CGContextDrawImage(cgContext, dRect, [bitmap CGImage]);
+ }
+#endif
CGContextRestoreGState(cgContext);
} else {
+#if (MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_4)
+ if (QSysInfo::MacintoshVersion > QSysInfo::MV_10_4) {
CGContextDrawImage(cgContext, dRect, [bitmap CGImage]);
+ }
+#endif
}
[bitmap release];