mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-09-06 18:05:37 +00:00
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>
This commit is contained in:
parent
4fe60423d7
commit
e720624906
|
@ -571,7 +571,7 @@ - (void) handleEvent:(NSEvent *)event
|
|||
// 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];
|
||||
|
|
Loading…
Reference in a new issue