Commit 94cae6a5 authored by Laurent Aimar's avatar Laurent Aimar

* ncurses: fixed the error that was making the browser so slow.

parent b33d1c49
...@@ -447,6 +447,7 @@ static int HandleKey( intf_thread_t *p_intf, int i_key ) ...@@ -447,6 +447,7 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
} }
if( p_sys->i_box_type == BOX_BROWSE ) if( p_sys->i_box_type == BOX_BROWSE )
{ {
vlc_bool_t b_ret = VLC_TRUE;
/* Browser navigation */ /* Browser navigation */
switch( i_key ) switch( i_key )
{ {
...@@ -498,9 +499,11 @@ static int HandleKey( intf_thread_t *p_intf, int i_key ) ...@@ -498,9 +499,11 @@ static int HandleKey( intf_thread_t *p_intf, int i_key )
} }
break; break;
default: default:
return 1; b_ret = VLC_FALSE;
break; break;
}
if( b_ret )
{
if( p_sys->i_box_bidx >= p_sys->i_dir_entries ) p_sys->i_box_bidx = p_sys->i_dir_entries - 1; if( p_sys->i_box_bidx >= p_sys->i_dir_entries ) p_sys->i_box_bidx = p_sys->i_dir_entries - 1;
if( p_sys->i_box_bidx < 0 ) p_sys->i_box_bidx = 0; if( p_sys->i_box_bidx < 0 ) p_sys->i_box_bidx = 0;
return 1; return 1;
......
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