Commit ef8cc371 authored by Jean-Paul Saman's avatar Jean-Paul Saman

Forward port of revision 12566: Ignore menu select|right|left|up|down when OSD Menu is not visible

parent 266e4aa0
......@@ -40,6 +40,15 @@
static void osd_UpdateState( osd_menu_state_t *, int, int, int, int, picture_t * );
static inline osd_state_t *osd_VolumeStateChange( osd_state_t *, int );
static int osd_VolumeStep( vlc_object_t *, int, int );
static vlc_bool_t osd_isVisible( osd_menu_t *p_osd );
static vlc_bool_t osd_isVisible( osd_menu_t *p_osd )
{
vlc_value_t val;
var_Get( p_osd, "osd-menu-visible", &val );
return val.b_bool;
}
/*****************************************************************************
* OSD menu Funtions
......@@ -263,6 +272,12 @@ void __osd_MenuActivate( vlc_object_t *p_this )
return;
}
if( osd_isVisible( p_osd ) == VLC_FALSE )
{
vlc_object_release( (vlc_object_t*) p_osd );
return;
}
var_Get( p_this->p_libvlc, "osd_mutex", &lockval );
vlc_mutex_lock( lockval.p_address );
......@@ -319,6 +334,12 @@ void __osd_MenuNext( vlc_object_t *p_this )
return;
}
if( osd_isVisible( p_osd ) == VLC_FALSE )
{
vlc_object_release( (vlc_object_t*) p_osd );
return;
}
var_Get( p_this->p_libvlc, "osd_mutex", &lockval );
vlc_mutex_lock( lockval.p_address );
......@@ -363,6 +384,12 @@ void __osd_MenuPrev( vlc_object_t *p_this )
return;
}
if( osd_isVisible( p_osd ) == VLC_FALSE )
{
vlc_object_release( (vlc_object_t*) p_osd );
return;
}
var_Get( p_this->p_libvlc, "osd_mutex", &lockval );
vlc_mutex_lock( lockval.p_address );
......@@ -410,6 +437,12 @@ void __osd_MenuUp( vlc_object_t *p_this )
return;
}
if( osd_isVisible( p_osd ) == VLC_FALSE )
{
vlc_object_release( (vlc_object_t*) p_osd );
return;
}
var_Get( p_this->p_libvlc, "osd_mutex", &lockval );
vlc_mutex_lock( lockval.p_address );
......@@ -475,6 +508,12 @@ void __osd_MenuDown( vlc_object_t *p_this )
return;
}
if( osd_isVisible( p_osd ) == VLC_FALSE )
{
vlc_object_release( (vlc_object_t*) p_osd );
return;
}
var_Get( p_this->p_libvlc, "osd_mutex", &lockval );
vlc_mutex_lock( lockval.p_address );
......
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