From: svenhoefer Date: Wed, 15 Mar 2017 21:01:21 +0000 (+0100) Subject: - align to new neutrino.conf keywords X-Git-Url: https://git.webhop.me/?a=commitdiff_plain;h=e497f2260686c90ceadd991a29027b0842bbf291;p=blockads.git - align to new neutrino.conf keywords --- diff --git a/globals.c b/globals.c index 41fdddb..5f23208 100644 --- 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) { 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;