Skip to content

Commit

Permalink
Fix missing core percentages, issue #792
Browse files Browse the repository at this point in the history
  • Loading branch information
aristocratos committed Sep 21, 2024
1 parent 35857f8 commit 4210f5f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/btop_draw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 4210f5f

Please sign in to comment.