only overwrites the values if *both*, widthmm and heightmm, are <= 0. If I read the code correctly, this happens
a) if atof returned an error, or
b) if the user explicitly set a negative or zero value in the config file, or
c) if the value is not set in the config file at all.
I haven’t read much of the code, only some bits in Monitor.c, Configint.h and scan.c. But …
if (Monitor->widthmm <= 0 && Monitor->heightmm <= 0) { hsize; vsize;
Monitor->widthmm = 10 * DDC->features.
Monitor->heightmm = 10 * DDC->features.
}
only overwrites the values if *both*, widthmm and heightmm, are <= 0. If I read the code correctly, this happens
a) if atof returned an error, or
b) if the user explicitly set a negative or zero value in the config file, or
c) if the value is not set in the config file at all.
Shouldn’t this be
if (Monitor->widthmm <= 0 || Monitor->heightmm <= 0) { hsize; vsize;
Monitor->widthmm = 10 * DDC->features.
Monitor->heightmm = 10 * DDC->features.
}
instead? Or – even better – check/set the values separately, one by one?