[vlc-devel] commit: Remove hotkeys "accounting" stuff. ( Rémi Denis-Courmont )

git version control git at videolan.org
Thu Mar 27 21:42:51 CET 2008


vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Thu Mar 27 22:26:54 2008 +0200| [1c2d8e7805f83edf1cd51f9de53eaace02b1c020]

Remove hotkeys "accounting" stuff.

That was never written to (except by KeyActionCB that _that_ was never
invoked ever, and did not make sense). Note that, had it worked as it
probably was intended, this "accounting" data should have been kept
inside the hotkeys plugin, not the libvlc instance data anyhow.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1c2d8e7805f83edf1cd51f9de53eaace02b1c020
---

 include/main.h            |    5 -----
 modules/control/hotkeys.c |   15 +--------------
 2 files changed, 1 insertions(+), 19 deletions(-)

diff --git a/include/main.h b/include/main.h
index b940749..c798a60 100644
--- a/include/main.h
+++ b/include/main.h
@@ -79,11 +79,6 @@ struct libvlc_int_t
         const char *psz_action;
         int i_action;
         int i_key;
-
-        /* hotkey accounting information */
-        mtime_t i_delta_date;/*< minimum delta time between two key presses */
-        mtime_t i_last_date; /*< last date key was pressed */
-        int     i_times;     /*< n times pressed within delta date*/
     } *p_hotkeys;
 };
 
diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c
index 065cb68..3ffd4cc 100644
--- a/modules/control/hotkeys.c
+++ b/modules/control/hotkeys.c
@@ -154,23 +154,11 @@ static void Run( intf_thread_t *p_intf )
     {
         input_thread_t *p_input;
         vout_thread_t *p_last_vout;
-        int i_times = 0;
         int i_action = GetAction( p_intf );
 
         if( i_action == -1 )
             break; /* die */
 
-        for( i = 0; p_hotkeys[i].psz_action != NULL; i++ )
-        {
-            if( p_hotkeys[i].i_action == i_action )
-            {
-                i_times  = p_hotkeys[i].i_times;
-                /* times key pressed within max. delta time */
-                p_hotkeys[i].i_times = 0;
-                break;
-            }
-        }
- 
         /* Update the input */
         PL_LOCK;
         p_input = p_playlist->p_input;
@@ -436,8 +424,7 @@ static void Run( intf_thread_t *p_intf )
 #define SET_TIME( a, b ) \
     i_interval = config_GetInt( p_input, a "-jump-size" ); \
     if( i_interval > 0 ) { \
-        val.i_time = ( (mtime_t)(i_interval * b) * 1000000L \
-                       * ((mtime_t)(1 << i_times))); \
+        val.i_time = (mtime_t)(i_interval * b) * 1000000L; \
         var_Set( p_input, "time-offset", val ); \
         DisplayPosition( p_intf, p_vout, p_input ); \
     }




More information about the vlc-devel mailing list