From 412ce72f0b7dcef3bd3a33ef09598c31802b91b0 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Tue, 9 May 2017 13:04:34 +0200 Subject: [PATCH] - add compatibility to old neutrino.conf keywords --- shellexec.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) 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; -- 2.39.5