mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-02-11 04:10:52 +00:00
- Fixes https://github.com/termux/termux-packages/issues/27760 - Rebase `CMakeLists.txt.patch` - Rebase `disable_pthread.patch` - Rebase `improve-cpu-sensor-guessing.patch` (after https://github.com/aristocratos/btop/pull/1319, `s_contains()` -> `std::string::contains()` avoids `error: use of undeclared identifier 's_contains'`)
23 lines
738 B
Diff
23 lines
738 B
Diff
diff --git a/src/linux/btop_collect.cpp b/src/linux/btop_collect.cpp
|
|
index 119dd6a..2ae36e8 100644
|
|
--- a/src/linux/btop_collect.cpp
|
|
+++ b/src/linux/btop_collect.cpp
|
|
@@ -517,6 +517,17 @@ namespace Cpu {
|
|
cpu_sensor = name;
|
|
break;
|
|
}
|
|
+
|
|
+ // Android frequently has heterogeneous CPUs. Try to grab the sensor for the BIG cores.
|
|
+ if (str_to_lower(name).contains("big")) {
|
|
+ cpu_sensor = name;
|
|
+ break;
|
|
+ }
|
|
+ // Failing that, grab the first thermal zone so the random pick below doesn't choose the battery or some other chip.
|
|
+ if (str_to_lower(name).contains("thermal0/")) {
|
|
+ cpu_sensor = name;
|
|
+ break;
|
|
+ }
|
|
}
|
|
if (cpu_sensor.empty()) {
|
|
cpu_sensor = found_sensors.begin()->first;
|