X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fanalogtv.c;h=1ff995d2ccef12ac4f2f52cb5abc860cce45418b;hb=f8cf5ac7b2f53510f80a0eaf286a25298be17bfe;hp=f271d26b0682b7b8c4e635ccb118b42fcb553bb8;hpb=c1b9b55ad8d59dc05ef55e316aebf5863e7dfa56;p=xscreensaver diff --git a/hacks/analogtv.c b/hacks/analogtv.c index f271d26b..1ff995d2 100644 --- a/hacks/analogtv.c +++ b/hacks/analogtv.c @@ -304,6 +304,12 @@ analogtv_configure(analogtv *it) wlim = it->xgwa.width; ratio = wlim / (float) hlim; +#ifdef USE_IPHONE + /* Fill the whole iPhone screen, even though that distorts the image. */ + min_ratio = 320.0 / 480.0 * (1 - percent); + max_ratio = 480.0 / 320.0 * (1 + percent); +#endif + if (wlim < 266 || hlim < 200) { wlim = 266; @@ -494,6 +500,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 +845,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 +906,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 +1037,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 +1250,7 @@ analogtv_draw(analogtv *it) if (lineno==it->shrinkpulse) { baseload += 0.4; - bigloadchange=1; + /*bigloadchange=1;*/ it->shrinkpulse=-1; } @@ -1296,7 +1303,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; }