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

David Fuhrmann git at videolan.org
Sat Jul 7 21:37:08 CEST 2012


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

macosx: handle volume apple remote keys as hotkeys, so that osd stuff is shown
(cherry picked from commit e0b3dcd221af12921ef9f8ceeb5e1eab30e6019b)

Conflicts:

	modules/gui/macosx/intf.m

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

 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 3cfc359..78c97ec 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -973,10 +973,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)
@@ -1010,10 +1012,12 @@ static VLCMain *_o_sharedMainInstance = nil;
             }
             break;
         case kRemoteButtonVolume_Plus:
-            [[VLCCoreInteraction sharedInstance] volumeUp];
+            if( p_intf )
+                var_SetInteger( p_intf->p_libvlc, "key-action", ACTIONID_VOL_UP );
             break;
         case kRemoteButtonVolume_Minus:
-            [[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