From: svenhoefer Date: Wed, 15 Mar 2017 20:54:26 +0000 (+0100) Subject: - align to new neutrino.conf keywords X-Git-Url: https://git.webhop.me/?a=commitdiff_plain;h=c4631940c8f58d0e7f619d00a8168e133258cfa0;p=tuxwetter.git - align to new neutrino.conf keywords --- diff --git a/tuxwetter.c b/tuxwetter.c index 48c5e5a..dd294ab 100644 --- a/tuxwetter.c +++ b/tuxwetter.c @@ -2752,9 +2752,9 @@ int llev=m->headerlevels[m->act_header], lmen=m->act_header, lentr=m->lastheader void read_neutrino_osd_conf(int *ex,int *sx,int *ey, int *sy) { const char *filename="/var/tuxbox/config/neutrino.conf"; - const char spres[][5]={"","_crt","_lcd"}; + const char spres[][4]={"","crt","lcd"}; char sstr[4][32]; - int pres=-1, loop, *sptr[4]={ex, sx, ey, sy}; + int pres=-1, resolution=-1, loop, *sptr[4]={ex, sx, ey, sy}; char *buffer; size_t len; ssize_t read; @@ -2766,15 +2766,16 @@ void read_neutrino_osd_conf(int *ex,int *sx,int *ey, int *sy) len = 0; while ((read = getline(&buffer, &len, fd)) != -1){ sscanf(buffer, "screen_preset=%d", &pres); + sscanf(buffer, "osd_resolution=%d", &resolution); } if(buffer) free(buffer); rewind(fd); ++pres; - sprintf(sstr[0], "screen_EndX%s=%%d", spres[pres]); - sprintf(sstr[1], "screen_StartX%s=%%d", spres[pres]); - sprintf(sstr[2], "screen_EndY%s=%%d", spres[pres]); - sprintf(sstr[3], "screen_StartY%s=%%d", spres[pres]); + sprintf(sstr[0], "screen_EndX_%s_%d=%%d", spres[pres], resolution); + sprintf(sstr[1], "screen_StartX_%s_%d=%%d", spres[pres], resolution); + sprintf(sstr[2], "screen_EndY_%s_%d=%%d", spres[pres], resolution); + sprintf(sstr[3], "screen_StartY_%s_%d=%%d", spres[pres], resolution); buffer=NULL; len = 0;