Changeset 78984fbe8eb7538aef18dae48972ec6a446d77bb

Show
Ignore:
Timestamp:
10/26/03 14:10:05 (5 years ago)
Author:
Sigmund Augdal Helberg <sigmunau@videolan.org>
git-committer:
Sigmund Augdal Helberg <sigmunau@videolan.org> 1067173805 +0000
git-parent:

[54167ecfaa603fd199627944650aacced2e16e6c]

git-author:
Sigmund Augdal Helberg <sigmunau@videolan.org> 1067173805 +0000
Message:

modules/access/dvdplay/intf.c:

  • use new key-pressed in p_vlc, and not the one in p_vout

src/video_output/video_output.c:

  • do not create the key-pressed variable in p_vout
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/access/dvdplay/intf.c

    r38b5689 r78984fb  
    33 ***************************************************************************** 
    44 * Copyright (C) 2002 VideoLAN 
    5  * $Id: intf.c,v 1.7 2003/08/13 01:45:13 gbazin Exp $ 
     5 * $Id: intf.c,v 1.8 2003/10/26 13:10:05 sigmunau Exp $ 
    66 * 
    77 * Authors: St�ane Borel <stef@via.ecp.fr> 
     
    8181 
    8282    p_intf->pf_run = RunIntf; 
    83  
     83     
     84    var_AddCallback( p_intf->p_vlc, "key-pressed", KeyEvent, p_intf ); 
    8485    p_intf->p_sys->m_still_time = 0; 
    8586    p_intf->p_sys->b_inf_still = 0; 
     
    9596{ 
    9697    intf_thread_t *p_intf = (intf_thread_t *)p_this; 
    97  
     98    var_DelCallback( p_intf->p_vlc, "key-pressed", KeyEvent, p_intf ); 
    9899    /* Destroy structure */ 
    99100    free( p_intf->p_sys ); 
     
    109110    mtime_t             mtime = 0; 
    110111    mtime_t             mlast = 0; 
     112    int i_nav_up = config_GetInt( p_intf, "nav-up-key" ); 
     113    int i_nav_down = config_GetInt( p_intf, "nav-down-key" ); 
     114    int i_nav_left = config_GetInt( p_intf, "nav-left-key" ); 
     115    int i_nav_right = config_GetInt( p_intf, "nav-right-key" ); 
     116    int i_nav_activate = config_GetInt( p_intf, "nav-activate-key" ); 
    111117 
    112118    if( InitThread( p_intf ) < 0 ) 
     
    215221         * keyboard event 
    216222         */ 
    217         if( p_vout && p_intf->p_sys->b_key_pressed ) 
     223        if( p_intf->p_sys->b_key_pressed ) 
    218224        { 
    219225            vlc_value_t val; 
     
    222228            p_intf->p_sys->b_key_pressed = VLC_FALSE; 
    223229             
    224             var_Get( p_vout, "key-pressed", &val ); 
    225             if ( val.psz_string
    226             { 
    227                 if( !strcmp( val.psz_string, "LEFT" )
     230            var_Get( p_intf->p_vlc, "key-pressed", &val ); 
     231            if ( val.i_int
     232            { 
     233                if( val.i_int == i_nav_left
    228234                { 
    229235                    p_intf->p_sys->control.type = DVDCtrlLeftButtonSelect; 
    230236                } 
    231                 else if( !strcmp( val.psz_string, "RIGHT" )
     237                else if( val.i_int == i_nav_right
    232238                { 
    233239                    p_intf->p_sys->control.type = DVDCtrlRightButtonSelect; 
    234240                } 
    235                 else if( !strcmp( val.psz_string, "UP" )
     241                else if( val.i_int == i_nav_up
    236242                { 
    237243                    p_intf->p_sys->control.type = DVDCtrlUpperButtonSelect; 
    238244                } 
    239                 else if( !strcmp( val.psz_string, "DOWN" )
     245                else if( val.i_int == i_nav_down
    240246                { 
    241247                    p_intf->p_sys->control.type = DVDCtrlLowerButtonSelect; 
    242248                } 
    243                 else if( !strcmp( val.psz_string, "ENTER" )
     249                else if( val.i_int == i_nav_activate
    244250                { 
    245251                    p_intf->p_sys->control.type = DVDCtrlButtonActivate; 
     
    274280            var_DelCallback( p_vout, "mouse-moved", MouseEvent, p_intf ); 
    275281            var_DelCallback( p_vout, "mouse-clicked", MouseEvent, p_intf ); 
    276             var_DelCallback( p_vout, "key-pressed", KeyEvent, p_intf ); 
    277282            vlc_object_release( p_vout ); 
    278283            p_vout = NULL; 
     
    287292                var_AddCallback( p_vout, "mouse-moved", MouseEvent, p_intf ); 
    288293                var_AddCallback( p_vout, "mouse-clicked", MouseEvent, p_intf ); 
    289                 var_AddCallback( p_vout, "key-pressed", KeyEvent, p_intf ); 
    290294            } 
    291295        } 
     
    299303        var_DelCallback( p_vout, "mouse-moved", MouseEvent, p_intf ); 
    300304        var_DelCallback( p_vout, "mouse-clicked", MouseEvent, p_intf ); 
    301         var_DelCallback( p_vout, "key-pressed", KeyEvent, p_intf ); 
    302305        vlc_object_release( p_vout ); 
    303306    } 
  • src/video_output/video_output.c

    r123a98f r78984fb  
    66 ***************************************************************************** 
    77 * Copyright (C) 2000-2001 VideoLAN 
    8  * $Id: video_output.c,v 1.238 2003/10/08 10:07:22 zorglub Exp $ 
     8 * $Id: video_output.c,v 1.239 2003/10/26 13:10:05 sigmunau Exp $ 
    99 * 
    1010 * Authors: Vincent Seguin <seguin@via.ecp.fr> 
     
    284284    var_Create( p_vout, "mouse-moved", VLC_VAR_BOOL ); 
    285285    var_Create( p_vout, "mouse-clicked", VLC_VAR_INTEGER ); 
    286     var_Create( p_vout, "key-pressed", VLC_VAR_STRING ); 
    287286 
    288287    var_Create( p_vout, "intf-change", VLC_VAR_BOOL );