X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fcontrol%2Frc.c;h=e9f90058b057fd805d4383151869414b711ce9c4;hb=e7ee6a9d861ea4f62a828ebd929f8ecd15b4163f;hp=d57151b1e222c92b1557db12386b28b9d6b2a2a0;hpb=25232e200b39db62c3e49f9269c215a71873c7f9;p=vlc diff --git a/modules/control/rc.c b/modules/control/rc.c index d57151b1e2..e9f90058b0 100644 --- a/modules/control/rc.c +++ b/modules/control/rc.c @@ -34,7 +34,6 @@ #include #include /* ENOMEM */ -#include #include #include @@ -220,14 +219,14 @@ static int Activate( vlc_object_t *p_this ) #ifndef WIN32 #if defined(HAVE_ISATTY) /* Check that stdin is a TTY */ - if( !config_GetInt( p_intf, "rc-fake-tty" ) && !isatty( 0 ) ) + if( !var_InheritInteger( p_intf, "rc-fake-tty" ) && !isatty( 0 ) ) { msg_Warn( p_intf, "fd 0 is not a TTY" ); return VLC_EGENERIC; } #endif - psz_unix_path = config_GetPsz( p_intf, "rc-unix" ); + psz_unix_path = var_InheritString( p_intf, "rc-unix" ); if( psz_unix_path ) { int i_socket; @@ -295,7 +294,7 @@ static int Activate( vlc_object_t *p_this ) #endif /* !WIN32 */ if( ( pi_socket == NULL ) && - ( psz_host = config_GetPsz( p_intf, "rc-host" ) ) != NULL ) + ( psz_host = var_InheritString( p_intf, "rc-host" ) ) != NULL ) { vlc_url_t url; @@ -334,7 +333,7 @@ static int Activate( vlc_object_t *p_this ) p_intf->pf_run = Run; #ifdef WIN32 - p_intf->p_sys->b_quiet = config_GetInt( p_intf, "rc-quiet" ); + p_intf->p_sys->b_quiet = var_InheritInteger( p_intf, "rc-quiet" ); if( !p_intf->p_sys->b_quiet ) { CONSOLE_INTRO_MSG; } #else CONSOLE_INTRO_MSG; @@ -447,7 +446,7 @@ static void Run( intf_thread_t *p_intf ) playlist_t * p_playlist = pl_Hold( p_intf ); char p_buffer[ MAX_LINE_LENGTH + 1 ]; - bool b_showpos = config_GetInt( p_intf, "rc-show-pos" ); + bool b_showpos = var_InheritInteger( p_intf, "rc-show-pos" ); bool b_longhelp = false; int i_size = 0; @@ -739,8 +738,8 @@ static void Run( intf_thread_t *p_intf ) } else if( !strcmp( psz_cmd, "key" ) || !strcmp( psz_cmd, "hotkey" ) ) { - var_SetInteger( p_intf->p_libvlc, "key-pressed", - config_GetInt( p_intf, psz_arg ) ); + var_SetInteger( p_intf->p_libvlc, "key-action", + vlc_GetActionId( psz_arg ) ); } else switch( psz_cmd[0] ) {