Fix gears rotation for high timestamp values
authorKristian Høgsberg <krh@redhat.com>
Sun, 13 Sep 2009 01:08:48 +0000 (21:08 -0400)
committerKristian Høgsberg <krh@redhat.com>
Sun, 13 Sep 2009 01:08:48 +0000 (21:08 -0400)
gears.c

diff --git a/gears.c b/gears.c
index d32aa96..5654bac 100644 (file)
--- a/gears.c
+++ b/gears.c
@@ -322,7 +322,7 @@ handle_frame(void *data,
 
        wl_compositor_commit(gears->compositor, 0);
 
-       gears->angle = timestamp / 20.0;
+       gears->angle = (GLfloat) (timestamp % 8192) * 360 / 8192.0;
 }
 
 static const struct wl_compositor_listener compositor_listener = {