From: svenhoefer Date: Tue, 9 May 2017 11:04:34 +0000 (+0200) Subject: - add compatibility to old neutrino.conf keywords X-Git-Url: https://git.webhop.me/?a=commitdiff_plain;h=412ce72f0b7dcef3bd3a33ef09598c31802b91b0;p=shellexec.git - add compatibility to old neutrino.conf keywords --- diff --git a/shellexec.c b/shellexec.c index d576cbc..4cfa74d 100644 --- a/shellexec.c +++ b/shellexec.c @@ -12,7 +12,7 @@ #include "pngw.h" -#define SH_VERSION 2.01 +#define SH_VERSION 2.02 static char CFG_FILE[128]="/var/tuxbox/config/shellexec.conf"; @@ -1602,19 +1602,31 @@ int main (int argc, char **argv) spr=Read_Neutrino_Cfg("screen_preset")+1; resolution=Read_Neutrino_Cfg("osd_resolution"); - sprintf(trstr,"screen_StartX_%s_%d", spres[spr], resolution); + if (resolution == -1) + sprintf(trstr,"screen_StartX_%s", spres[spr]); + else + sprintf(trstr,"screen_StartX_%s_%d", spres[spr], resolution); if((sx=Read_Neutrino_Cfg(trstr))<0) sx=100; - sprintf(trstr,"screen_EndX_%s_%d", spres[spr], resolution); + if (resolution == -1) + sprintf(trstr,"screen_EndX_%s", spres[spr]); + else + sprintf(trstr,"screen_EndX_%s_%d", spres[spr], resolution); if((ex=Read_Neutrino_Cfg(trstr))<0) ex=1180; - sprintf(trstr,"screen_StartY_%s_%d", spres[spr], resolution); + if (resolution == -1) + sprintf(trstr,"screen_StartY_%s", spres[spr]); + else + sprintf(trstr,"screen_StartY_%s_%d", spres[spr], resolution); if((sy=Read_Neutrino_Cfg(trstr))<0) sy=100; - sprintf(trstr,"screen_EndY_%s_%d", spres[spr], resolution); + if (resolution == -1) + sprintf(trstr,"screen_EndY_%s", spres[spr]); + else + sprintf(trstr,"screen_EndY_%s_%d", spres[spr], resolution); if((ey=Read_Neutrino_Cfg(trstr))<0) ey=620;