From 82fca5c9f29124f37f6dcd08e73e6999ce44a69d Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 16 Nov 2026 20:31:59 -0300 Subject: Add display-paced frame timing and presentation feedback in Zig --- src/host/root.zig | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/host/root.zig') diff --git a/src/host/root.zig b/src/host/root.zig index c9cdde6..158f894 100644 --- a/src/host/root.zig +++ b/src/host/root.zig @@ -6,6 +6,7 @@ //! --headless offscreen video, silent audio //! --script FILE play a script instead of reading devices //! --fresh start from default state: no snapshots or recordings +//! --timing-marker encode frame ID and draw sample time for video analysis //! --profile-gpu time each GPU command alone, print the times at exit //! --console LINE run a console line once the sketch is loaded (repeatable) //! --define NAME=VALUE substitute {NAME} in the script @@ -45,6 +46,8 @@ pub fn main(init: std.process.Init, linked: ?abi.Sketch) !void { options.fresh = true; } else if (std.mem.eql(u8, arg, "--headless")) { options.headless = true; + } else if (std.mem.eql(u8, arg, "--timing-marker")) { + options.timing_marker = true; } else if (std.mem.eql(u8, arg, "--profile-gpu")) { options.profile_gpu = true; } else if (std.mem.eql(u8, arg, "--console")) { @@ -128,6 +131,7 @@ const usage = \\ --headless offscreen video, silent audio, no vsync \\ --script FILE play a script instead of reading devices \\ --fresh start from default state: no snapshots or recordings + \\ --timing-marker encode frame ID and draw sample time for video analysis \\ --profile-gpu time each GPU command alone, print the times at exit \\ --console LINE run a console line once the sketch is loaded (repeatable) \\ --define NAME=VALUE substitute {NAME} in the script @@ -201,4 +205,5 @@ test { _ = @import("audio.zig"); _ = @import("Console.zig"); _ = @import("control.zig"); + _ = @import("timing_marker.zig"); } -- cgit v1.3