This removes useless wakeups and improves hotkeys reactivity
int i_times = 0;
/* Sleep a bit */
int i_times = 0;
/* Sleep a bit */
- msleep( INTF_IDLE_SLEEP );
+// msleep( INTF_IDLE_SLEEP );
/* Update the input */
if( p_intf->p_sys->p_input == NULL )
/* Update the input */
if( p_intf->p_sys->p_input == NULL )
+ vlc_mutex_lock( &p_intf->object_lock );
+ vlc_cond_wait( &p_intf->object_wait, &p_intf->object_lock );
+ vlc_mutex_unlock( &p_intf->object_lock );
/* No key pressed, sleep a bit more */
/* No key pressed, sleep a bit more */
- msleep( INTF_IDLE_SLEEP );
+// msleep( INTF_IDLE_SLEEP );
p_intf->p_sys->p_keys[ p_intf->p_sys->i_size ] = newval.i_int;
p_intf->p_sys->i_size++;
}
p_intf->p_sys->p_keys[ p_intf->p_sys->i_size ] = newval.i_int;
p_intf->p_sys->i_size++;
}
+ vlc_mutex_lock( &p_intf->object_lock );
+ vlc_cond_signal( &p_intf->object_wait );
+ vlc_mutex_unlock( &p_intf->object_lock );
vlc_mutex_unlock( &p_intf->p_sys->change_lock );
return VLC_SUCCESS;
vlc_mutex_unlock( &p_intf->p_sys->change_lock );
return VLC_SUCCESS;
{
p_intf->b_die = VLC_TRUE;
if( p_intf->pf_run )
{
p_intf->b_die = VLC_TRUE;
if( p_intf->pf_run )
+ {
+ vlc_cond_signal( &p_intf->object_wait );
vlc_thread_join( p_intf );
vlc_thread_join( p_intf );