vo_corevideo: add key_modifier_alt only when pressing left option key

This commit is contained in:
Stefano Pigozzi 2011-03-13 16:54:18 +01:00 committed by Uoti Urpala
parent ea828cbb37
commit b10b2b5b2c
1 changed files with 4 additions and 1 deletions

View File

@ -89,6 +89,9 @@ static int int_pause = 0;
static BOOL isLeopardOrLater;
#define NSLeftAlternateKeyMask (0x000020 | NSAlternateKeyMask)
#define NSRightAlternateKeyMask (0x000040 | NSAlternateKeyMask)
static vo_info_t info =
{
"Mac OS X Core Video",
@ -943,7 +946,7 @@ static int control(uint32_t request, void *data)
key |= KEY_MODIFIER_SHIFT;
if([theEvent modifierFlags] & NSControlKeyMask)
key |= KEY_MODIFIER_CTRL;
if([theEvent modifierFlags] & NSAlternateKeyMask)
if(([theEvent modifierFlags] & NSLeftAlternateKeyMask) == NSLeftAlternateKeyMask)
key |= KEY_MODIFIER_ALT;
if([theEvent modifierFlags] & NSCommandKeyMask)
key |= KEY_MODIFIER_META;