[vlc-commits] macosx: use hotkeys for apple remote volume control
David Fuhrmann
git at videolan.org
Thu Apr 4 11:29:37 CEST 2013
vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Thu Apr 4 11:26:18 2013 +0200| [4490c86761457243c90f456f4b2410f6159f355c] | committer: David Fuhrmann
macosx: use hotkeys for apple remote volume control
partial revert of 9929cc94ce61b48c666dcf1aa2b65c1e7de763c9
Until we find a better solution. As discussed on ML.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4490c86761457243c90f456f4b2410f6159f355c
---
modules/gui/macosx/intf.m | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index c5fced6..fead1e4 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -1060,10 +1060,12 @@ static VLCMain *_o_sharedMainInstance = nil;
[[VLCCoreInteraction sharedInstance] backward];
break;
case kRemoteButtonVolume_Plus_Hold:
- [[VLCCoreInteraction sharedInstance] volumeUp];
+ if (p_intf)
+ var_SetInteger(p_intf->p_libvlc, "key-action", ACTIONID_VOL_UP);
break;
case kRemoteButtonVolume_Minus_Hold:
- [[VLCCoreInteraction sharedInstance] volumeDown];
+ if (p_intf)
+ var_SetInteger(p_intf->p_libvlc, "key-action", ACTIONID_VOL_DOWN);
break;
}
if (b_remote_button_hold) {
@@ -1097,13 +1099,15 @@ static VLCMain *_o_sharedMainInstance = nil;
if (config_GetInt(VLCIntf, "macosx-appleremote-sysvol"))
[NSSound increaseSystemVolume];
else
- [[VLCCoreInteraction sharedInstance] volumeUp];
+ if (p_intf)
+ var_SetInteger(p_intf->p_libvlc, "key-action", ACTIONID_VOL_UP);
break;
case kRemoteButtonVolume_Minus:
if (config_GetInt(VLCIntf, "macosx-appleremote-sysvol"))
[NSSound decreaseSystemVolume];
else
- [[VLCCoreInteraction sharedInstance] volumeDown];
+ if (p_intf)
+ var_SetInteger(p_intf->p_libvlc, "key-action", ACTIONID_VOL_DOWN);
break;
case kRemoteButtonRight:
if (config_GetInt(VLCIntf, "macosx-appleremote-prevnext"))
More information about the vlc-commits
mailing list