diff options
author | Graham Inggs <ginggs@debian.org> | 2021-03-18 14:03:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-18 14:03:51 +0200 |
commit | ee97916fd530c82b8747bd90b7d1b98e92f858ae (patch) | |
tree | 6b2190f138fbeb946ef8c9bd5a49e77e55e9410d /DisplayOptionsPanel.c | |
parent | 1ba3915f73e019fe9fd94e53794137060fbf8c66 (diff) | |
parent | fd2a0cf4219ac6b000e3ef46e1958edd2ff41a67 (diff) |
Merge pull request #436 from cgzones/freebsd
FreeBSD: add support for CPU frequency and temperature
Tested on two physical systems running FreeBSD 12.1
Diffstat (limited to 'DisplayOptionsPanel.c')
-rw-r--r-- | DisplayOptionsPanel.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/DisplayOptionsPanel.c b/DisplayOptionsPanel.c index c6228b70..884045f3 100644 --- a/DisplayOptionsPanel.c +++ b/DisplayOptionsPanel.c @@ -118,8 +118,16 @@ DisplayOptionsPanel* DisplayOptionsPanel_new(Settings* settings, ScreenManager* Panel_add(super, (Object*) CheckItem_newByRef("Add guest time in CPU meter percentage", &(settings->accountGuestInCPUMeter))); Panel_add(super, (Object*) CheckItem_newByRef("Also show CPU percentage numerically", &(settings->showCPUUsage))); Panel_add(super, (Object*) CheckItem_newByRef("Also show CPU frequency", &(settings->showCPUFrequency))); - #ifdef HAVE_SENSORS_SENSORS_H - Panel_add(super, (Object*) CheckItem_newByRef("Also show CPU temperature (requires libsensors)", &(settings->showCPUTemperature))); + #ifdef BUILD_WITH_CPU_TEMP + Panel_add(super, (Object*) CheckItem_newByRef( + #ifdef HTOP_LINUX + "Also show CPU temperature (requires libsensors)", + #elif defined(HTOP_FREEBSD) + "Also show CPU temperature", + #else + #error Unknown temperature implementation! + #endif + &(settings->showCPUTemperature))); Panel_add(super, (Object*) CheckItem_newByRef("- Show temperature in degree Fahrenheit instead of Celsius", &(settings->degreeFahrenheit))); #endif Panel_add(super, (Object*) CheckItem_newByRef("Enable the mouse", &(settings->enableMouse))); |