summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorJohn Arbuckle2017-06-28 21:37:16 +0200
committerPeter Maydell2017-06-29 16:07:16 +0200
commite72062490620d0c9ff8a0c6e6cf6013fc918a26a (patch)
tree3be03af5c777c3401803012bed6c76f1f7b677e0 /ui
parentMerge remote-tracking branch 'remotes/juanquintela/tags/migration/20170628' i... (diff)
downloadqemu-e72062490620d0c9ff8a0c6e6cf6013fc918a26a.tar.gz
qemu-e72062490620d0c9ff8a0c6e6cf6013fc918a26a.tar.xz
qemu-e72062490620d0c9ff8a0c6e6cf6013fc918a26a.zip
ui/cocoa.m: Fix compatibility issue with Mac OS 10.9 and under
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> Message-id: F6C36C1A-4661-48F4-BEA6-3994889927D0@gmail.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'ui')
-rw-r--r--ui/cocoa.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/cocoa.m b/ui/cocoa.m
index 9e81285d86..93e56d0518 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];