]> git.sesse.net Git - vlc/commitdiff
CACA: use key thread (partially fix #3661)
authorRémi Denis-Courmont <remi@remlab.net>
Sun, 30 May 2010 11:43:54 +0000 (14:43 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sun, 30 May 2010 11:43:54 +0000 (14:43 +0300)
modules/video_output/Modules.am
modules/video_output/caca.c

index 92f28feefaf493a01de0c87cb0175e7dabee4632..23c780d769ce48334377dd21b6aee7ad9b4fae99 100644 (file)
@@ -5,7 +5,7 @@ SUBDIRS = msw
 LIBTOOL=@LIBTOOL@ --tag=CC
 
 SOURCES_aa = aa.c
-SOURCES_caca = caca.c
+SOURCES_caca = caca.c keythread.h keythread.c
 SOURCES_fb = fb.c
 SOURCES_vout_sdl = sdl.c keythread.h keythread.c
 SOURCES_snapshot = snapshot.c
index 6de1ca19a27898fd10f6947bd3a7eecb2d6bb392..eaa4c22832f8523c5785f165877f91f628ac47e9 100644 (file)
@@ -34,6 +34,7 @@
 #include <vlc_plugin.h>
 #include <vlc_vout_display.h>
 #include <vlc_picture_pool.h>
+#include "keythread.h"
 
 #include <caca.h>
 
@@ -72,6 +73,7 @@ struct vout_display_sys_t {
     cucul_dither_t *dither;
 
     picture_pool_t *pool;
+    key_thread_t   *keys;
 };
 
 /**
@@ -188,6 +190,7 @@ static int Open(vlc_object_t *object)
     vout_display_SendEventFullscreen(vd, false);
     Refresh(vd);
 
+    sys->keys = vlc_CreateKeyThread(vd);
     return VLC_SUCCESS;
 
 error:
@@ -217,6 +220,7 @@ static void Close(vlc_object_t *object)
     vout_display_t *vd = (vout_display_t *)object;
     vout_display_sys_t *sys = vd->sys;
 
+    vlc_DestroyKeyThread(sys->keys);
     if (sys->pool)
         picture_pool_Delete(sys->pool);
     if (sys->dither)
@@ -477,7 +481,7 @@ static void Manage(vout_display_t *vd)
                     const int vlc = keys[i].vlc;
 
                     if (vlc >= 0)
-                        vout_display_SendEventKey(vd, vlc);
+                        vlc_EmitKey(sys->keys, vlc);
                     return;
                 }
             }