vtgl

terminal emulator implemented in OpenGL
git clone anongit@rnpnr.xyz:vtgl.git
Log | Files | Refs | Feed | LICENSE

Commit: 5329fd7e405d7030cd24466b5d2368b12414ea19
Parent: 14e0160333868651534fc9fff110d1744109c5d5
Author: Randy Palamar
Date:   Wed,  6 Nov 2024 09:31:21 -0700

debug: shut up warning and print target text with same colour as bar

Diffstat:
Mdebug.c | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/debug.c b/debug.c @@ -218,7 +218,7 @@ draw_debug_bar_chart(Term *t, DebugState *ds, RenderCtx *rc, v2 bar_chart_top_le pos.y -= bar_thick + bar_pad; DebugRegion *hot_region = 0; - f32 hot_region_secs; + f32 hot_region_secs = 0; u32 displayed_records = ds->record_count; if (displayed_records > 12) @@ -256,18 +256,19 @@ draw_debug_bar_chart(Term *t, DebugState *ds, RenderCtx *rc, v2 bar_chart_top_le txt.widx = 0; } + v4 target_colour = (v4){.g = .38, .b = .78, .a = 1}; Rect target_marker = {.pos = pos}; target_marker.pos.x += bar_chart_magnitude; target_marker.size.w = 4; target_marker.size.h = displayed_records * (bar_thick + bar_pad) - bar_pad; - push_rect(rc, target_marker, (v4){.g = .38, .b = .78, .a = 1}); + push_rect(rc, target_marker, target_colour); stream_push_s8(&txt, s8("Target Time: ")); stream_push_f64(&txt, target_time * 1e3, 100); pos.x += bar_chart_magnitude + 8; pos.y = bar_chart_top_left.y - 0.75 * displayed_records * (bar_thick + bar_pad); stream_push_s8(&txt, s8(" [ms]")); - push_s8(rc, pos, fg, g_ui_debug_font_id, stream_to_s8(&txt)); + push_s8(rc, pos, target_colour, g_ui_debug_font_id, stream_to_s8(&txt)); if (hot_region) { DebugMetadata *txt_meta = hot_region->meta;