Commit 041b88e4 authored by Felix Paul Kühne's avatar Felix Paul Kühne

macosx: use CoreInteraction code for the media key triggers

no functional change
(cherry picked from commit 8548e873e73f7e2838fee5e758eeb31ce158f5bb)
parent 9a59642d
......@@ -839,15 +839,15 @@ static VLCMain *_o_sharedMainInstance = nil;
int keyRepeat = (keyFlags & 0x1);
if( keyCode == NX_KEYTYPE_PLAY && keyState == 0 )
var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_PLAY_PAUSE );
[[VLCCoreInteraction sharedInstance] play];
if( (keyCode == NX_KEYTYPE_FAST || keyCode == NX_KEYTYPE_NEXT) && !b_mediakeyJustJumped )
{
if( keyState == 0 && keyRepeat == 0 )
var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_NEXT );
[[VLCCoreInteraction sharedInstance] next];
else if( keyRepeat == 1 )
{
var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_JUMP_FORWARD_SHORT );
[[VLCCoreInteraction sharedInstance] forwardShort];
b_mediakeyJustJumped = YES;
[self performSelector:@selector(resetMediaKeyJump)
withObject: NULL
......@@ -858,10 +858,10 @@ static VLCMain *_o_sharedMainInstance = nil;
if( (keyCode == NX_KEYTYPE_REWIND || keyCode == NX_KEYTYPE_PREVIOUS) && !b_mediakeyJustJumped )
{
if( keyState == 0 && keyRepeat == 0 )
var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_PREV );
[[VLCCoreInteraction sharedInstance] previous];
else if( keyRepeat == 1 )
{
var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_JUMP_BACKWARD_SHORT );
[[VLCCoreInteraction sharedInstance] backwardShort];
b_mediakeyJustJumped = YES;
[self performSelector:@selector(resetMediaKeyJump)
withObject: NULL
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment