diff options
Diffstat (limited to 'debian/patches/0011-improve-setup-for-many-cpu-systems.patch')
-rw-r--r-- | debian/patches/0011-improve-setup-for-many-cpu-systems.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/debian/patches/0011-improve-setup-for-many-cpu-systems.patch b/debian/patches/0011-improve-setup-for-many-cpu-systems.patch new file mode 100644 index 0000000..bae69f5 --- /dev/null +++ b/debian/patches/0011-improve-setup-for-many-cpu-systems.patch @@ -0,0 +1,47 @@ +From 8fb51627b2e116d7957f57f27aff31ea726d7d86 Mon Sep 17 00:00:00 2001 +From: Daniel Lange <DLange@git.local> +Date: Tue, 2 Feb 2021 10:32:11 +0100 +Subject: [PATCH] Improve initial setup for systems with many CPUs + +Resolves #435 +--- + Settings.c | 19 +++++++++++++++++-- + 1 file changed, 17 insertions(+), 2 deletions(-) + +diff --git a/Settings.c b/Settings.c +index 6c8f8894..f12a51f4 100644 +--- a/Settings.c ++++ b/Settings.c +@@ -55,7 +55,7 @@ static void Settings_readMeterModes(Settings* this, const char* line, int column + + static void Settings_defaultMeters(Settings* this, int initialCpuCount) { + int sizes[] = { 3, 3 }; +- if (initialCpuCount > 4) { ++ if (initialCpuCount > 4 && initialCpuCount <= 128) { + sizes[1]++; + } + for (int i = 0; i < 2; i++) { +@@ -64,7 +64,22 @@ static void Settings_defaultMeters(Settings* this, int initialCpuCount) { + this->columns[i].len = sizes[i]; + } + int r = 0; +- if (initialCpuCount > 8) { ++ ++ if (initialCpuCount > 128) { ++ // Just show the average, ricers need to config for impressive screenshots ++ this->columns[0].names[0] = xStrdup("CPU"); ++ this->columns[0].modes[0] = BAR_METERMODE; ++ } else if (initialCpuCount > 32) { ++ this->columns[0].names[0] = xStrdup("LeftCPUs8"); ++ this->columns[0].modes[0] = BAR_METERMODE; ++ this->columns[1].names[r] = xStrdup("RightCPUs8"); ++ this->columns[1].modes[r++] = BAR_METERMODE; ++ } else if (initialCpuCount > 16) { ++ this->columns[0].names[0] = xStrdup("LeftCPUs4"); ++ this->columns[0].modes[0] = BAR_METERMODE; ++ this->columns[1].names[r] = xStrdup("RightCPUs4"); ++ this->columns[1].modes[r++] = BAR_METERMODE; ++ } else if (initialCpuCount > 8) { + this->columns[0].names[0] = xStrdup("LeftCPUs2"); + this->columns[0].modes[0] = BAR_METERMODE; + this->columns[1].names[r] = xStrdup("RightCPUs2"); |