All of lore.kernel.org
 help / color / mirror / Atom feed
From: Programmingkid <programmingkidx@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "qemu-devel@nongnu.org qemu-devel" <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] ui/cocoa.m: Fix compatibility issue with Mac OS 10.9 and under
Date: Wed, 28 Jun 2017 15:37:16 -0400	[thread overview]
Message-ID: <F6C36C1A-4661-48F4-BEA6-3994889927D0@gmail.com> (raw)

The [NSEvent modifierFlags] method returns an NSEventModifierFlags type value in Mac OS 10.10. It use to be of type NSUInteger. Replacing NSEventModifierFlags with NSUInteger allows for the cooca.m file to be compiled on older versions of Mac OS. This patch was been tested on Mac OS 10.6 and Mac OS 10.12 without problem.

Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
---
 ui/cocoa.m | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/cocoa.m b/ui/cocoa.m
index 9e81285..93e56d0 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -571,7 +571,7 @@ QemuCocoaView *cocoaView;
                 // bitmask.
 
                 if (qemu_console_is_graphic(NULL)) {
-                    NSEventModifierFlags modifiers = [event modifierFlags];
+                    NSUInteger modifiers = [event modifierFlags];
 
                     if (!!(modifiers & NSEventModifierFlagCapsLock) != !!modifiers_state[Q_KEY_CODE_CAPS_LOCK]) {
                         [self toggleStatefulModifier:Q_KEY_CODE_CAPS_LOCK];
-- 
2.7.2

             reply	other threads:[~2017-06-28 19:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-28 19:37 Programmingkid [this message]
2017-06-29 15:21 ` [Qemu-devel] [PATCH] ui/cocoa.m: Fix compatibility issue with Mac OS 10.9 and under Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F6C36C1A-4661-48F4-BEA6-3994889927D0@gmail.com \
    --to=programmingkidx@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.