]> git.webhop.me Git - tuxwetter.git/commitdiff
- add compatibility to old neutrino.conf keywords
authorsvenhoefer <svenhoefer@svenhoefer.com>
Tue, 9 May 2017 11:06:14 +0000 (13:06 +0200)
committersvenhoefer <svenhoefer@svenhoefer.com>
Tue, 9 May 2017 11:06:14 +0000 (13:06 +0200)
tuxwetter.c

index cf8a2bd7fda47a6f53a6749d25c78f981c556ec8..8a75510cd62179af4dc86a09f47727c78f53001c 100644 (file)
@@ -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;