diff gui/cfg.c @ 34593:83f7a2f8af3b

Adjust content of GUI configuration file to MPlayer configuration files. Use option=<value> without spaces and quote value only if necessary. (The change of the output format is purely cosmetic, but shall make the interested GUI user aware that defining options is basically the same for MPlayer and the GUI.)
author ib
date Fri, 10 Feb 2012 14:57:29 +0000
parents ddf8f24a93a6
children c20ac9b80ea5
line wrap: on
line diff
--- a/gui/cfg.c	Fri Feb 10 14:13:14 2012 +0000
+++ b/gui/cfg.c	Fri Feb 10 14:57:29 2012 +0000
@@ -370,7 +370,12 @@
             }
 
             if (val) {
-                fprintf(file, "%s = \"%s\"\n", gui_opts[i].name, val);
+                char delim[] = { "\"" };
+
+                if (!strchr(val, ' '))
+                    *delim = 0;
+
+                fprintf(file, "%s=%s%s%s\n", gui_opts[i].name, delim, val, delim);
                 free(val);
             }
         }