]> git.webhop.me Git - blockads.git/commitdiff
- add compatibility to old neutrino.conf keywords
authorsvenhoefer <svenhoefer@svenhoefer.com>
Tue, 9 May 2017 10:56:16 +0000 (12:56 +0200)
committersvenhoefer <svenhoefer@svenhoefer.com>
Tue, 9 May 2017 10:56:16 +0000 (12:56 +0200)
globals.c
globals.h

index 5f232081f854f2515b97d7ca7623dc14a6562445..438fec456f671f78fe3bc34386e6080f717642e5 100644 (file)
--- a/globals.c
+++ b/globals.c
@@ -182,10 +182,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;
index 212995d4ccf2af3708633642ecf0691aad95b632..e3bc8bfdb027056daf0067f6a4c3fccfc1a83868 100644 (file)
--- a/globals.h
+++ b/globals.h
@@ -23,7 +23,7 @@
 #define __GLOBALS_H__
 
 
-#define P_VERSION "0.78"
+#define P_VERSION "0.79"
 
 #define ADS_FILE       "/tmp/blockads.ads"
 #define ZAP_FILE       "/tmp/blockads.zap"