From patchwork Sun Dec 13 02:55:31 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 41007 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id AF8E6B7B65 for ; Sun, 13 Dec 2009 13:57:59 +1100 (EST) Received: from localhost ([127.0.0.1]:60664 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJeej-0007m2-3x for incoming@patchwork.ozlabs.org; Sat, 12 Dec 2009 21:57:57 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NJecz-0007HL-B8 for qemu-devel@nongnu.org; Sat, 12 Dec 2009 21:56:09 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NJecu-0007F9-OL for qemu-devel@nongnu.org; Sat, 12 Dec 2009 21:56:09 -0500 Received: from [199.232.76.173] (port=45232 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NJecu-0007F5-Iq for qemu-devel@nongnu.org; Sat, 12 Dec 2009 21:56:04 -0500 Received: from fmmailgate03.web.de ([217.72.192.234]:58340) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NJecu-0000ez-0a for qemu-devel@nongnu.org; Sat, 12 Dec 2009 21:56:04 -0500 Received: from smtp07.web.de (fmsmtp07.dlan.cinetic.de [172.20.5.215]) by fmmailgate03.web.de (Postfix) with ESMTP id DD253138AD3F4 for ; Sun, 13 Dec 2009 03:56:01 +0100 (CET) Received: from [84.148.98.194] (helo=localhost.localdomain) by smtp07.web.de with asmtp (WEB.DE 4.110 #314) id 1NJecr-0000uu-01; Sun, 13 Dec 2009 03:56:01 +0100 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Sun, 13 Dec 2009 03:55:31 +0100 Message-Id: <1260672941-9365-2-git-send-email-andreas.faerber@web.de> X-Mailer: git-send-email 1.6.5.3 In-Reply-To: <1260672941-9365-1-git-send-email-andreas.faerber@web.de> References: <1260672941-9365-1-git-send-email-andreas.faerber@web.de> MIME-Version: 1.0 X-Sender: Andreas.Faerber@web.de X-Provags-ID: V01U2FsdGVkX1+YUC2l2VJzy7veimZTVsWMo1ct9yY02ZO4DJKN qxcY3Rnlf2+9Vz7DhxehKZfMIVcqABZuwAbY11qEONa8aoRHG4 ydC6+iMdRPLog8QT9zyw== X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [Qemu-devel] [PATCH 01/11] Cocoa: ppc64 host support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- cocoa.m | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/cocoa.m b/cocoa.m index 55ff2b4..989efd5 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;