diff options
| author | Paul Oliver <contact@pauloliver.dev> | 2026-06-25 04:42:23 +0200 |
|---|---|---|
| committer | Paul Oliver <contact@pauloliver.dev> | 2026-06-28 02:50:18 +0200 |
| commit | 95fd6ae836ab5fee7387f4df46b727165a05b723 (patch) | |
| tree | 79c715d250f44c1aa1a0d05e65be313ae4cd3e15 /ui/curses/ui.c | |
| parent | 0f5581f53f73a92d33826c4771553a9683376e67 (diff) | |
Adds v1 unit tests and fixes bugs found by them
Diffstat (limited to 'ui/curses/ui.c')
| -rw-r--r-- | ui/curses/ui.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/ui/curses/ui.c b/ui/curses/ui.c index 9d253a3..ace7bf9 100644 --- a/ui/curses/ui.c +++ b/ui/curses/ui.c @@ -255,7 +255,10 @@ void gfx_render_mbst(const struct Core *core, uint64_t pos, uint64_t zoom) { uint64_t mb1a = arch_proc_mb1_addr(core, pix); gfx_accumulate_pixel(pos, zoom, mb0a, g_gfx_mbst); - gfx_accumulate_pixel(pos, zoom, mb1a, g_gfx_mbst); + + if (arch_proc_mb1_size(core, pix)) { + gfx_accumulate_pixel(pos, zoom, mb1a, g_gfx_mbst); + } } } @@ -418,12 +421,6 @@ void tui_uld_field(int l, const char *label, uint64_t value) { tui_line(false, l, PAIR_NORMAL, A_NORMAL, "%-4s : %#18ld", label, value); } -void tui_float_field(int l, const char *label, float value) { - assert(label); - assert(strlen(label) <= 4); - tui_line(false, l, PAIR_NORMAL, A_NORMAL, "%-4s : %18.1f", label, value); -} - void tui_print_core(int l) { tui_line(false, ++l, PAIR_HEADER, A_BOLD, "CORE [%d]", g_core); tui_ulx_field(++l, "cycl", g_cores[g_core].cycl); @@ -928,7 +925,7 @@ void tui_print(void) { tui_ulx_field(l++, "step", g_steps); tui_ulx_field(l++, "sync", g_syncs); tui_ulx_field(l++, "step", g_step_block); - tui_float_field(l++, "stps", g_steps_per_sec); + tui_ulx_field(l++, "stps", (uint64_t)g_steps_per_sec); switch (g_page) { case PAGE_CORE: |
