Ignore remote control commands when OSD is not displayed
authorlekernel <sebastien.bourdeauducq@lekernel.net>
Fri, 2 Jul 2010 16:58:44 +0000 (18:58 +0200)
committerlekernel <sebastien.bourdeauducq@lekernel.net>
Fri, 2 Jul 2010 16:58:44 +0000 (18:58 +0200)
software/demo/osd.c

index 67f3578..fe9dcc2 100644 (file)
@@ -162,6 +162,8 @@ static void start_patch_from_list(int n)
 static void process_keys(unsigned int keys)
 {
        osd_timer = OSD_DURATION;
+       if(osd_alpha == 0)
+               return;
 
        if(keys & GPIO_BTN1) {
                if(patchlist_sel > 0)
@@ -263,10 +265,8 @@ int osd_fill_blit_td(struct tmu_td *td, tmu_callback callback, void *user)
        new_keys = keys & ~previous_keys;
        previous_keys = keys;
 
-       if(new_keys) {
-               if(osd_alpha != 0)
-                       process_keys(new_keys);
-       }
+       if(new_keys)
+               process_keys(new_keys);
 
        /* handle IR remote */
        if(irq_pending() & IRQ_IR) {