From 44e4c0ba863b0be130d0e87e71f456b8b529addb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 13 Dec 2009 00:45:40 +0100 Subject: [PATCH] Cocoa: ppc64 host support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix integer usage in the Cocoa backend: NSInteger is long on LP64. http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSView_Class/Reference/NSView.html#//apple_ref/doc/uid/20000014-BBCFHHCD This makes the graphical display show up on a ppc64 host. v3: - Confine NSInteger to Mac OS X v10.5 and later Signed-off-by: Andreas Färber Signed-off-by: malc --- cocoa.m | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cocoa.m b/cocoa.m index 55ff2b46b0..989efd5b9a 100644 --- a/cocoa.m +++ b/cocoa.m @@ -28,6 +28,10 @@ #include "console.h" #include "sysemu.h" +#ifndef MAC_OS_X_VERSION_10_5 +#define MAC_OS_X_VERSION_10_5 1050 +#endif + //#define DEBUG @@ -337,7 +341,11 @@ int cocoa_keycode_to_qemu(int keycode) } else { // selective drawing code (draws only dirty rectangles) (OS X >= 10.4) const NSRect *rectList; +#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5) + NSInteger rectCount; +#else int rectCount; +#endif int i; CGImageRef clipImageRef; CGRect clipRect;