X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fanalogtv.c;h=63368f5f73f5509ed31a8f26ca0c649c78b5d63f;hb=50be9bb40dc60130c99ffa568e6677779904ff70;hp=f271d26b0682b7b8c4e635ccb118b42fcb553bb8;hpb=c1b9b55ad8d59dc05ef55e316aebf5863e7dfa56;p=xscreensaver diff --git a/hacks/analogtv.c b/hacks/analogtv.c index f271d26b..63368f5f 100644 --- a/hacks/analogtv.c +++ b/hacks/analogtv.c @@ -494,6 +494,7 @@ analogtv_release(analogtv *it) it->gc=NULL; if (it->n_colors) XFreeColors(it->dpy, it->colormap, it->colors, it->n_colors, 0L); it->n_colors=0; + free(it); } @@ -838,7 +839,7 @@ analogtv_setup_frame(analogtv *it) } hnc += hni + (int)(random()%65536)-32768; } - hnc -= (ANALOGTV_V * ANALOGTV_H)<<8; +/* hnc -= (ANALOGTV_V * ANALOGTV_H)<<8;*/ } if (it->rx_signal_level != 0.0) @@ -899,7 +900,7 @@ analogtv_sync(analogtv *it) double *sp; double cbfc=1.0/128.0; - sp = it->rx_signal + lineno*ANALOGTV_H + cur_hsync; +/* sp = it->rx_signal + lineno*ANALOGTV_H + cur_hsync;*/ for (i=-32; i<32; i++) { lineno = (cur_vsync + i + ANALOGTV_V) % ANALOGTV_V; sp = it->rx_signal + lineno*ANALOGTV_H; @@ -1030,11 +1031,11 @@ analogtv_setup_levels(analogtv *it, double avgheight) it->leveltable[height][0].index=0; } if (avgheight>=5) { - it->leveltable[height][height-1].index=0; + if (height >= 1) it->leveltable[height][height-1].index=0; } if (avgheight>=7) { it->leveltable[height][1].index=1; - it->leveltable[height][height-2].index=1; + if (height >= 2) it->leveltable[height][height-2].index=1; } for (i=0; ihashnoise_on) baseload=0.5; */ - bigloadchange=1; + /*bigloadchange=1;*/ drawcount=0; it->crtload[ANALOGTV_TOP-1]=baseload; puheight = puramp(it, 2.0, 1.0, 1.3) * it->height_control * @@ -1243,7 +1244,7 @@ analogtv_draw(analogtv *it) if (lineno==it->shrinkpulse) { baseload += 0.4; - bigloadchange=1; + /*bigloadchange=1;*/ it->shrinkpulse=-1; } @@ -1296,7 +1297,7 @@ analogtv_draw(analogtv *it) { int totsignal=0; - double ncl,diff; + double ncl/*,diff*/; for (i=0; i184 ? (slineno-184)*(lineno-184)*0.001 * it->squeezebottom : 0.0)); - diff=ncl - it->crtload[lineno]; - bigloadchange = (diff>0.01 || diff<-0.01); + /*diff=ncl - it->crtload[lineno];*/ + /*bigloadchange = (diff>0.01 || diff<-0.01);*/ it->crtload[lineno]=ncl; }