Skip to content

Commit

Permalink
ui/cocoa.m: Fix compatibility issue with Mac OS 10.9 and under
Browse files Browse the repository at this point in the history
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 <[email protected]>
Message-id: [email protected]
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
  • Loading branch information
programmingkidx authored and pm215 committed Jun 29, 2017
1 parent 4fe6042 commit e720624
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/cocoa.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit e720624

Please sign in to comment.