diff options
author | aristocratos <admin@qvantnet.com> | 2021-10-16 19:37:09 +0200 |
---|---|---|
committer | aristocratos <admin@qvantnet.com> | 2021-10-16 19:37:09 +0200 |
commit | 289880aaa6d1a3625c01e9d7643138343b29db53 (patch) | |
tree | 6de84e5ba408386ec8a55aa9b89e4a10f2cac020 | |
parent | 88a2528ca3a2390f2c94c7f1a18ba982a5e5f2b2 (diff) | |
parent | 3ffb21203aa3f4ad978533a3f2b1e67e636381ea (diff) |
Merge branch 'OSX' of github.com:aristocratos/btop into OSX
-rw-r--r-- | src/osx/btop_collect.cpp | 10 | ||||
-rw-r--r-- | src/osx/sensors.cpp | 3 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/osx/btop_collect.cpp b/src/osx/btop_collect.cpp index dbe7f3e..12ce949 100644 --- a/src/osx/btop_collect.cpp +++ b/src/osx/btop_collect.cpp @@ -225,11 +225,13 @@ namespace Cpu { bool get_sensors() { Logger::debug("get_sensors"); got_sensors = false; - ThermalSensors sensors; - if (sensors.getSensors().size() > 0) { - got_sensors = true; + if (Config::getB("show_coretemp") and Config::getB("check_temp")) { + ThermalSensors sensors; + if (sensors.getSensors().size() > 0) { + got_sensors = true; + } + Logger::debug("got sensors:" + std::to_string(got_sensors)); } - Logger::debug("got sensors:" + std::to_string(got_sensors)); return got_sensors; } diff --git a/src/osx/sensors.cpp b/src/osx/sensors.cpp index 8252238..8451bd1 100644 --- a/src/osx/sensors.cpp +++ b/src/osx/sensors.cpp @@ -7,6 +7,8 @@ #include <map> #include <string> +#include <btop_tools.hpp> + extern "C" { typedef struct __IOHIDEvent *IOHIDEventRef; typedef struct __IOHIDServiceClient *IOHIDServiceClientRef; @@ -60,6 +62,7 @@ CFArrayRef getProductNames(CFDictionaryRef sensors) { } CFRelease(name); } + CFRelease(system); return array; } |