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

index 41fdddb61966e69d9d178fdb6ef257228b10554f..5f232081f854f2515b97d7ca7623dc14a6562445 100644 (file)
--- a/globals.c
+++ b/globals.c
@@ -162,9 +162,9 @@ char *cptr;
 void read_neutrino_osd_conf(int *ex, int *sx, int *ey, int *sy)\r
 {
        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;
@@ -176,15 +176,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;