From: Jean-Philippe Orsini Date: Wed, 28 Dec 2011 23:38:47 +0000 (+0000) Subject: next branch release will be v0.6.2.17 X-Git-Url: http://git.wpitchoune.net/gitweb/?p=psensor.git;a=commitdiff_plain;h=1aee50e91aad2a7e84bed3c72ec8f4007e334039 next branch release will be v0.6.2.17 fixed sensor type displayed in sensor preferences dialog. --- diff --git a/NEWS b/NEWS index dab7917..907068b 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +* v0.6.2.17 + +** psensor: fixed sensor type displayed in sensor preferences dialog. + * v0.6.2.16 ** psensor: removed -pedantic and ignores deprecation warnings diff --git a/src/lib/psensor.c b/src/lib/psensor.c index 141779e..de726e4 100644 --- a/src/lib/psensor.c +++ b/src/lib/psensor.c @@ -396,30 +396,30 @@ struct psensor **get_all_sensors(int values_max_length) const char *psensor_type_to_str(unsigned int type) { - if (type & SENSOR_TYPE_REMOTE) - return "Remote"; - - if (type & SENSOR_TYPE_LMSENSOR_TEMP) - return "Temperature"; - - if (type & SENSOR_TYPE_LMSENSOR_FAN) - return "Fan"; - - if (type & SENSOR_TYPE_NVIDIA_TEMP) + if ((type & SENSOR_TYPE_NVIDIA_TEMP) == SENSOR_TYPE_NVIDIA_TEMP) return "NVidia GPU Temperature"; - if (type & SENSOR_TYPE_AMD_TEMP) + if ((type & SENSOR_TYPE_AMD_TEMP) == SENSOR_TYPE_AMD_TEMP) return "AMD GPU Temperature"; - if (type & SENSOR_TYPE_AMD_FAN) + if ((type & SENSOR_TYPE_AMD_FAN) == SENSOR_TYPE_AMD_FAN) return "AMD GPU Fan Speed"; - if (type & SENSOR_TYPE_HDD_TEMP) + if ((type & SENSOR_TYPE_HDD_TEMP) == SENSOR_TYPE_HDD_TEMP) return "HDD Temperature"; if (type & SENSOR_TYPE_CPU_USAGE) return "CPU Usage"; + if (type & SENSOR_TYPE_TEMP) + return "Temperature"; + + if (type & SENSOR_TYPE_FAN) + return "Fan"; + + if (type & SENSOR_TYPE_REMOTE) + return "Remote"; + return "N/A"; /* should not be possible */ }