summaryrefslogtreecommitdiff
path: root/src/draw.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/draw.zig')
-rw-r--r--src/draw.zig13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/draw.zig b/src/draw.zig
index 5c1844bb..b4fc3a2c 100644
--- a/src/draw.zig
+++ b/src/draw.zig
@@ -742,16 +742,21 @@ pub fn render(p: *Pardes, arena: std.mem.Allocator) !*Surface {
}
const effective_font = p.settings.font.effective_name.get();
const font_name = if (effective_font.len == 0) "default" else effective_font;
- var ov_buf: [256]u8 = undefined;
+ var ov_buf: [384]u8 = undefined;
+ // The probe's last second (FrameStats); under a virtual clock its
+ // real-time numbers would make every golden of this box differ.
+ var frames_buf: [96]u8 = undefined;
+ const virtual = !pardes.hosted or std.c.getenv("PARDES_TEST_CLOCK") != null;
+ const timings = if (virtual) "frame virtual clock\n" else p.frames.summary(&frames_buf);
const text = std.fmt.bufPrint(
&ov_buf,
- "pardes resizes={d}\ntheme {s}\nfont {s}\nterms {d} cols {d}\nactive #{d} {d}x{d}\nscroll {d}/{d}\npinch {d:6.4}\ntscroll {d:7.4}",
- .{ p.resize_count, p.theme().name, font_name[0..@min(font_name.len, 64)], nlive, p.ncol, p.active, at.cols, at.rows, sb_off, sb_total, p.ov_pinch_scale, p.ov_touch_scroll_delta },
+ "pardes resizes={d}\ntheme {s}\nfont {s}\nterms {d} cols {d}\nactive #{d} {d}x{d}\nscroll {d}/{d}\npinch {d:6.4}\ntscroll {d:7.4}\n{s}",
+ .{ p.resize_count, p.theme().name, font_name[0..@min(font_name.len, 64)], nlive, p.ncol, p.active, at.cols, at.rows, sb_off, sb_total, p.ov_pinch_scale, p.ov_touch_scroll_delta, timings },
) catch "";
// wide enough for the longest theme name compiled in, which is the
// only row here whose width is not ours to choose
const ow: u16 = 38;
- const oh: u16 = 10;
+ const oh: u16 = 12;
const ox: u16 = if (s.cols > ow) s.cols - ow else 0;
if (ox + ow <= s.cols and p.topBarHeight() + oh <= s.rows) {
s.addRegion(.{ .kind = .debug, .rect = .{ .x = ox, .y = p.topBarHeight(), .w = ow, .h = oh } });