All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] ui/cocoa.m: Fix compatibility issue with Mac OS 10.9 and under
@ 2017-06-28 19:37 Programmingkid
  2017-06-29 15:21 ` Peter Maydell
  0 siblings, 1 reply; 2+ messages in thread
From: Programmingkid @ 2017-06-28 19:37 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel@nongnu.org qemu-devel

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-29 15:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-28 19:37 [Qemu-devel] [PATCH] ui/cocoa.m: Fix compatibility issue with Mac OS 10.9 and under Programmingkid
2017-06-29 15:21 ` Peter Maydell

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.