Changeset 78984fbe8eb7538aef18dae48972ec6a446d77bb
- 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
| r38b5689 |
r78984fb |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: St�ane Borel <stef@via.ecp.fr> |
|---|
| … | … | |
| 81 | 81 | |
|---|
| 82 | 82 | p_intf->pf_run = RunIntf; |
|---|
| 83 | | |
|---|
| | 83 | |
|---|
| | 84 | var_AddCallback( p_intf->p_vlc, "key-pressed", KeyEvent, p_intf ); |
|---|
| 84 | 85 | p_intf->p_sys->m_still_time = 0; |
|---|
| 85 | 86 | p_intf->p_sys->b_inf_still = 0; |
|---|
| … | … | |
| 95 | 96 | { |
|---|
| 96 | 97 | intf_thread_t *p_intf = (intf_thread_t *)p_this; |
|---|
| 97 | | |
|---|
| | 98 | var_DelCallback( p_intf->p_vlc, "key-pressed", KeyEvent, p_intf ); |
|---|
| 98 | 99 | /* Destroy structure */ |
|---|
| 99 | 100 | free( p_intf->p_sys ); |
|---|
| … | … | |
| 109 | 110 | mtime_t mtime = 0; |
|---|
| 110 | 111 | 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" ); |
|---|
| 111 | 117 | |
|---|
| 112 | 118 | if( InitThread( p_intf ) < 0 ) |
|---|
| … | … | |
| 215 | 221 | * keyboard event |
|---|
| 216 | 222 | */ |
|---|
| 217 | | if( p_vout && p_intf->p_sys->b_key_pressed ) |
|---|
| | 223 | if( p_intf->p_sys->b_key_pressed ) |
|---|
| 218 | 224 | { |
|---|
| 219 | 225 | vlc_value_t val; |
|---|
| … | … | |
| 222 | 228 | p_intf->p_sys->b_key_pressed = VLC_FALSE; |
|---|
| 223 | 229 | |
|---|
| 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 ) |
|---|
| 228 | 234 | { |
|---|
| 229 | 235 | p_intf->p_sys->control.type = DVDCtrlLeftButtonSelect; |
|---|
| 230 | 236 | } |
|---|
| 231 | | else if( !strcmp( val.psz_string, "RIGHT" ) ) |
|---|
| | 237 | else if( val.i_int == i_nav_right ) |
|---|
| 232 | 238 | { |
|---|
| 233 | 239 | p_intf->p_sys->control.type = DVDCtrlRightButtonSelect; |
|---|
| 234 | 240 | } |
|---|
| 235 | | else if( !strcmp( val.psz_string, "UP" ) ) |
|---|
| | 241 | else if( val.i_int == i_nav_up ) |
|---|
| 236 | 242 | { |
|---|
| 237 | 243 | p_intf->p_sys->control.type = DVDCtrlUpperButtonSelect; |
|---|
| 238 | 244 | } |
|---|
| 239 | | else if( !strcmp( val.psz_string, "DOWN" ) ) |
|---|
| | 245 | else if( val.i_int == i_nav_down ) |
|---|
| 240 | 246 | { |
|---|
| 241 | 247 | p_intf->p_sys->control.type = DVDCtrlLowerButtonSelect; |
|---|
| 242 | 248 | } |
|---|
| 243 | | else if( !strcmp( val.psz_string, "ENTER" ) ) |
|---|
| | 249 | else if( val.i_int == i_nav_activate ) |
|---|
| 244 | 250 | { |
|---|
| 245 | 251 | p_intf->p_sys->control.type = DVDCtrlButtonActivate; |
|---|
| … | … | |
| 274 | 280 | var_DelCallback( p_vout, "mouse-moved", MouseEvent, p_intf ); |
|---|
| 275 | 281 | var_DelCallback( p_vout, "mouse-clicked", MouseEvent, p_intf ); |
|---|
| 276 | | var_DelCallback( p_vout, "key-pressed", KeyEvent, p_intf ); |
|---|
| 277 | 282 | vlc_object_release( p_vout ); |
|---|
| 278 | 283 | p_vout = NULL; |
|---|
| … | … | |
| 287 | 292 | var_AddCallback( p_vout, "mouse-moved", MouseEvent, p_intf ); |
|---|
| 288 | 293 | var_AddCallback( p_vout, "mouse-clicked", MouseEvent, p_intf ); |
|---|
| 289 | | var_AddCallback( p_vout, "key-pressed", KeyEvent, p_intf ); |
|---|
| 290 | 294 | } |
|---|
| 291 | 295 | } |
|---|
| … | … | |
| 299 | 303 | var_DelCallback( p_vout, "mouse-moved", MouseEvent, p_intf ); |
|---|
| 300 | 304 | var_DelCallback( p_vout, "mouse-clicked", MouseEvent, p_intf ); |
|---|
| 301 | | var_DelCallback( p_vout, "key-pressed", KeyEvent, p_intf ); |
|---|
| 302 | 305 | vlc_object_release( p_vout ); |
|---|
| 303 | 306 | } |
|---|
| r123a98f |
r78984fb |
|
| 6 | 6 | ***************************************************************************** |
|---|
| 7 | 7 | * 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 $ |
|---|
| 9 | 9 | * |
|---|
| 10 | 10 | * Authors: Vincent Seguin <seguin@via.ecp.fr> |
|---|
| … | … | |
| 284 | 284 | var_Create( p_vout, "mouse-moved", VLC_VAR_BOOL ); |
|---|
| 285 | 285 | var_Create( p_vout, "mouse-clicked", VLC_VAR_INTEGER ); |
|---|
| 286 | | var_Create( p_vout, "key-pressed", VLC_VAR_STRING ); |
|---|
| 287 | 286 | |
|---|
| 288 | 287 | var_Create( p_vout, "intf-change", VLC_VAR_BOOL ); |
|---|