} else return FALSE;\r
*p = 0; // terminate option name\r
// now look if the command-line options define a setting for this engine option.\r
- p = strstr(cps->optionSettings, opt->name);\r
- if(p == cps->optionSettings || p[-1] == ',') {\r
+ if(cps->optionSettings && cps->optionSettings[0])\r
+ p = strstr(cps->optionSettings, opt->name); else p = NULL;\r
+ if(p && (p == cps->optionSettings || p[-1] == ',')) {\r
sprintf(buf, "option %s", p);\r
if(p = strstr(buf, ",")) *p = 0;\r
strcat(buf, "\n");\r
if (!InitInstance(hInstance, nCmdShow, lpCmdLine)) {\r
return (FALSE);\r
}\r
+\r
// InitCommonControlsEx(&ex);\r
InitCommonControls();\r
\r
{\r
char *dummy;\r
FILE *f;\r
+ int ok; char buf[MSG_SIZ];\r
\r
- if (SearchPath(installDir, name, NULL, MSG_SIZ, fullname, &dummy)) {\r
+ ok = SearchPath(installDir, name, NULL, MSG_SIZ, fullname, &dummy);\r
+ if(!ok && strchr(name, '.') == NULL) { // [HGM] append default file-name extension '.ini' when needed\r
+ sprintf(buf, "%s.ini", name);\r
+ ok = SearchPath(installDir, buf, NULL, MSG_SIZ, fullname, &dummy);\r
+ }\r
+ if (ok) {\r
f = fopen(fullname, "r");\r
if (f != NULL) {\r
ParseArgs(FileGet, f);\r