From c3c39a77cd1d14be2cbe4df5a95444582f1103fa Mon Sep 17 00:00:00 2001 From: Rakarake Date: Tue, 24 Feb 2026 15:23:13 +0100 Subject: [PATCH] iTime now starts at 0 --- wayland.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wayland.c b/wayland.c index f258618..e4a554c 100644 --- a/wayland.c +++ b/wayland.c @@ -157,10 +157,16 @@ void egl_init_surface(struct client_state *state, struct surface *surface) { static const struct wl_callback_listener wl_surface_frame_listener; +bool first_frame_done = false; +uint32_t time_start; static void wl_surface_frame_done(void *data, struct wl_callback *cb, uint32_t time) { + if (!first_frame_done) { + first_frame_done = true; + time_start = time; + } struct surface *surface = data; - surface->time = time; + surface->time = time - time_start; /* Destroy this callback */ wl_callback_destroy(cb);