From 03b81084462c3861a3214c6fa704c9620663a63d Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Tue, 9 May 2017 13:06:14 +0200 Subject: [PATCH] - add compatibility to old neutrino.conf keywords --- tuxwetter.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/tuxwetter.c b/tuxwetter.c index cf8a2bd..8a75510 100644 --- a/tuxwetter.c +++ b/tuxwetter.c @@ -44,7 +44,7 @@ #include "resize.h" #include "gifdecomp.h" -#define P_VERSION "3.04" +#define P_VERSION "3.05" #ifndef HAVE_DREAMBOX_HARDWARE char CONVERT_LIST[]="/var/tuxbox/config/tuxwetter/convert.list"; @@ -2772,10 +2772,20 @@ void read_neutrino_osd_conf(int *ex,int *sx,int *ey, int *sy) free(buffer); rewind(fd); ++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); + if (resolution == -1) + { + 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]); + } + else + { + 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; -- 2.39.5