]> git.webhop.me Git - tuxwetter.git/commitdiff
- align to new neutrino.conf keywords
authorsvenhoefer <svenhoefer@svenhoefer.com>
Wed, 15 Mar 2017 20:54:26 +0000 (21:54 +0100)
committersvenhoefer <svenhoefer@svenhoefer.com>
Wed, 15 Mar 2017 20:54:26 +0000 (21:54 +0100)
tuxwetter.c

index 48c5e5a9796649e3dc08afff349cc0f678e21e3e..dd294ab347e78839ca02337699565ee84e588eda 100644 (file)
@@ -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;