]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
ui/cocoa.m: Fix compatibility issue with Mac OS 10.9 and under
authorJohn Arbuckle <programmingkidx@gmail.com>
Wed, 28 Jun 2017 19:37:16 +0000 (15:37 -0400)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 29 Jun 2017 14:07:16 +0000 (15:07 +0100)
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>
ui/cocoa.m

index 9e81285d86c2b6a69b1df687a87a001756370f73..93e56d05180420e1d1e63c0d0b98dd941a6551eb 100644 (file)
@@ -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];