From 845916ba6e0a8db9eec83fd3701dae96baba8af7 Mon Sep 17 00:00:00 2001 From: "sgunderson@bigfoot.com" <> Date: Sat, 18 Jul 2009 20:18:42 +0200 Subject: [PATCH 1/1] Parametrize FPS. --- glcapture.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/glcapture.c b/glcapture.c index e4af408..54fee16 100644 --- a/glcapture.c +++ b/glcapture.c @@ -19,6 +19,7 @@ #define WIDTH 640 #define HEIGHT 480 +#define FPS 50 static char buf[WIDTH * HEIGHT * 3]; static int frameno = 0; @@ -53,7 +54,7 @@ void glXSwapBuffers( Display *dpy, GLXDrawable drawable ) int gettimeofday(struct timeval *tv, struct timezone *tz) { printf("gettimeofday frame %u\n", frameno); - tv->tv_sec = frameno / 50; - tv->tv_usec = ((double)(frameno % 50) / 50) * 1000000; + tv->tv_sec = frameno / FPS; + tv->tv_usec = ((double)(frameno % FPS) / FPS) * 1000000; return 0; } -- 2.39.2