summaryrefslogtreecommitdiffstats
path: root/DisplayOptionsPanel.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-12-22 20:02:01 +0100
committerChristian Goettsche <cgzones@googlemail.com>2021-02-05 16:32:25 +0100
commitfd2a0cf4219ac6b000e3ef46e1958edd2ff41a67 (patch)
tree1c556519ebb1c235f2e8954e2de25d35dd1c2582 /DisplayOptionsPanel.c
parent64a1ab848f4cba7b9dd4705a169034e39048d27d (diff)
FreeBSD: add support for CPU frequency and temperature
Diffstat (limited to 'DisplayOptionsPanel.c')
-rw-r--r--DisplayOptionsPanel.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/DisplayOptionsPanel.c b/DisplayOptionsPanel.c
index 7e02b231..8f938fd6 100644
--- a/DisplayOptionsPanel.c
+++ b/DisplayOptionsPanel.c
@@ -116,8 +116,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)));

© 2014-2024 Faster IT GmbH | imprint | privacy policy