Commit 99fecdd8 authored by Yoann Peronneau's avatar Yoann Peronneau

* modules/gui/ncurses: fixes the fullscreen hotkey (Closes #164)

parent 367279c4
...@@ -835,16 +835,31 @@ static int HandleKey( intf_thread_t *p_intf, int i_key ) ...@@ -835,16 +835,31 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
/* Common control */ /* Common control */
case 'f': case 'f':
{ {
vout_thread_t *p_vout;
if( p_intf->p_sys->p_input ) if( p_intf->p_sys->p_input )
{ {
vout_thread_t *p_vout;
p_vout = vlc_object_find( p_intf->p_sys->p_input, p_vout = vlc_object_find( p_intf->p_sys->p_input,
VLC_OBJECT_VOUT, FIND_CHILD ); VLC_OBJECT_VOUT, FIND_CHILD );
if( p_vout ) if( p_vout )
{ {
p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE; var_Get( p_vout, "fullscreen", &val );
val.b_bool = !val.b_bool;
var_Set( p_vout, "fullscreen", val );
vlc_object_release( p_vout ); vlc_object_release( p_vout );
} }
else
{
playlist_t *p_playlist;
p_playlist = vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
if( p_playlist )
{
var_Get( p_playlist, "fullscreen", &val );
val.b_bool = !val.b_bool;
var_Set( p_playlist, "fullscreen", val );
vlc_object_release( p_playlist );
}
}
} }
return 0; return 0;
} }
......
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