[SCM] calf/master: + Knob: avoid zero-LED frames for bipolar knob (I will fix the frames later, but they're on the other PC)

js at users.alioth.debian.org js at users.alioth.debian.org
Tue May 7 15:37:21 UTC 2013


The following commit has been merged in the master branch:
commit 5985236e7b355d94f51059c01d1040a6bc2bfd49
Author: kfoltman <kfoltman at 78b06b96-2940-0410-b7fc-879d825d01d8>
Date:   Thu Jun 26 21:44:43 2008 +0000

    + Knob: avoid zero-LED frames for bipolar knob (I will fix the frames later,
      but they're on the other PC)
    
    
    git-svn-id: https://calf.svn.sourceforge.net/svnroot/calf/trunk@212 78b06b96-2940-0410-b7fc-879d825d01d8

diff --git a/src/custom_ctl.cpp b/src/custom_ctl.cpp
index 0615706..82afe45 100644
--- a/src/custom_ctl.cpp
+++ b/src/custom_ctl.cpp
@@ -336,6 +336,14 @@ calf_knob_expose (GtkWidget *widget, GdkEventExpose *event)
         if (pt > 0)
             phase = 33;
     }
+    // the source code for the knob generator is on the old PC, so this hack is temporarily needed
+    // (avoid totally blank knob frames which say nothing about value polarity)
+    if (self->knob_type == 1) {
+        if (phase == 31 || phase == 30)
+            phase = 29;
+        if (phase == 33 || phase == 34)
+            phase = 35;
+    }
     gdk_draw_pixbuf(GDK_DRAWABLE(widget->window), widget->style->fg_gc[0], CALF_KNOB_CLASS(GTK_OBJECT_GET_CLASS(widget))->knob_image, phase * 40, self->knob_type * 40, ox, oy, 40, 40, GDK_RGB_DITHER_NORMAL, 0, 0);
     // printf("exposed %p %d+%d\n", widget->window, widget->allocation.x, widget->allocation.y);
     if (gtk_widget_is_focus(widget))

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list