[vlc-commits] macosx: handle volume apple remote keys as hotkeys, so that osd stuff is shown

David Fuhrmann git at videolan.org
Wed Jul 4 20:16:17 CEST 2012


vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Wed Jul  4 20:13:28 2012 +0200| [e0b3dcd221af12921ef9f8ceeb5e1eab30e6019b] | committer: David Fuhrmann

macosx: handle volume apple remote keys as hotkeys, so that osd stuff is shown

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e0b3dcd221af12921ef9f8ceeb5e1eab30e6019b
---

 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 fcc7cc5..6626a36 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -977,10 +977,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)
@@ -1017,13 +1019,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:
             [[VLCCoreInteraction sharedInstance] next];



More information about the vlc-commits mailing list