Commit 4490c867 authored by David Fuhrmann's avatar David Fuhrmann

macosx: use hotkeys for apple remote volume control

partial revert of 9929cc94
Until we find a better solution. As discussed on ML.
parent 24a2b220
...@@ -1060,10 +1060,12 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -1060,10 +1060,12 @@ static VLCMain *_o_sharedMainInstance = nil;
[[VLCCoreInteraction sharedInstance] backward]; [[VLCCoreInteraction sharedInstance] backward];
break; break;
case kRemoteButtonVolume_Plus_Hold: case kRemoteButtonVolume_Plus_Hold:
[[VLCCoreInteraction sharedInstance] volumeUp]; if (p_intf)
var_SetInteger(p_intf->p_libvlc, "key-action", ACTIONID_VOL_UP);
break; break;
case kRemoteButtonVolume_Minus_Hold: case kRemoteButtonVolume_Minus_Hold:
[[VLCCoreInteraction sharedInstance] volumeDown]; if (p_intf)
var_SetInteger(p_intf->p_libvlc, "key-action", ACTIONID_VOL_DOWN);
break; break;
} }
if (b_remote_button_hold) { if (b_remote_button_hold) {
...@@ -1097,13 +1099,15 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -1097,13 +1099,15 @@ static VLCMain *_o_sharedMainInstance = nil;
if (config_GetInt(VLCIntf, "macosx-appleremote-sysvol")) if (config_GetInt(VLCIntf, "macosx-appleremote-sysvol"))
[NSSound increaseSystemVolume]; [NSSound increaseSystemVolume];
else else
[[VLCCoreInteraction sharedInstance] volumeUp]; if (p_intf)
var_SetInteger(p_intf->p_libvlc, "key-action", ACTIONID_VOL_UP);
break; break;
case kRemoteButtonVolume_Minus: case kRemoteButtonVolume_Minus:
if (config_GetInt(VLCIntf, "macosx-appleremote-sysvol")) if (config_GetInt(VLCIntf, "macosx-appleremote-sysvol"))
[NSSound decreaseSystemVolume]; [NSSound decreaseSystemVolume];
else else
[[VLCCoreInteraction sharedInstance] volumeDown]; if (p_intf)
var_SetInteger(p_intf->p_libvlc, "key-action", ACTIONID_VOL_DOWN);
break; break;
case kRemoteButtonRight: case kRemoteButtonRight:
if (config_GetInt(VLCIntf, "macosx-appleremote-prevnext")) if (config_GetInt(VLCIntf, "macosx-appleremote-prevnext"))
......
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