summaryrefslogtreecommitdiffstats
path: root/Settings.h
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2020-10-20 10:06:15 +0200
committerDaniel Lange <DLange@git.local>2020-10-20 10:06:15 +0200
commita0fb6e34f9e2dd83f535f3058f1a358637773298 (patch)
tree4ebdbe9ea599136b441eafa822d6b87575533307 /Settings.h
parent475fd1ec2ddd88a7b0a3109a89ed6c587f7761b7 (diff)
parent2899ed4cb00f4d887ee92c91e274ef098fd14f2b (diff)
Merge branch 'number-cpus-from-zero' of zevweiss/htop
* This changes the default to count CPUs from zero (instead of starting at one) * Settings logic is inverted, backwards compatibility is preserved
Diffstat (limited to 'Settings.h')
-rw-r--r--Settings.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Settings.h b/Settings.h
index 4eece3b0..bbd40e16 100644
--- a/Settings.h
+++ b/Settings.h
@@ -34,7 +34,7 @@ typedef struct Settings_ {
int direction;
ProcessField sortKey;
- bool countCPUsFromZero;
+ bool countCPUsFromOne;
bool detailedCPUTime;
bool showCPUUsage;
bool showCPUFrequency;
@@ -59,7 +59,7 @@ typedef struct Settings_ {
bool changed;
} Settings;
-#define Settings_cpuId(settings, cpu) ((settings)->countCPUsFromZero ? (cpu) : (cpu)+1)
+#define Settings_cpuId(settings, cpu) ((settings)->countCPUsFromOne ? (cpu)+1 : (cpu))
void Settings_delete(Settings* this);

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