Fix missing core percentages, issue #792

This commit is contained in:
aristocratos
2024-09-21 21:34:11 +02:00
parent 35857f85eb
commit 4210f5fc88

View File

@@ -814,10 +814,9 @@ namespace Cpu {
int cx = 0, cy = 1, cc = 0, core_width = (b_column_size == 0 ? 2 : 3);
if (Shared::coreCount >= 100) core_width++;
for (const auto& n : iota(0, Shared::coreCount)) {
if (cmp_less(core_graphs.size(), n+1)) break;
out += Mv::to(b_y + cy + 1, b_x + cx + 1) + Theme::c("main_fg") + (Shared::coreCount < 100 ? Fx::b + 'C' + Fx::ub : "")
+ ljust(to_string(n), core_width);
if (b_column_size > 0 or extra_width > 0)
if ((b_column_size > 0 or extra_width > 0) and cmp_less(n, core_graphs.size()))
out += Theme::c("inactive_fg") + graph_bg * (5 * b_column_size + extra_width) + Mv::l(5 * b_column_size + extra_width)
+ core_graphs.at(n)(safeVal(cpu.core_percent, n), data_same or redraw);