ref: 5f2f37dec38fb803426cd3c2b208766f5af206ee
parent: 298977f391e79902b3bd3d3b9f1f6d9c8a3d3347
author: Sigrid Haflínudóttir <[email protected]>
date: Sun Sep 6 09:12:17 EDT 2020
change a few numbers here and there
--- a/src/av19.c
+++ b/src/av19.c
@@ -221,6 +221,8 @@
static uvlong delay;
start = nanosec();
+ thisframe = curplayer->lastframe + 1000000000ULL/curplayer->fps - delay;
+
dt = 0;
lockdisplay(display);
@@ -231,9 +233,8 @@
dt += nanosec()-start;
if(res == 0){
- thisframe = curplayer->lastframe + 1000000000ULL/curplayer->fps - delay;
while(nanosec() < thisframe)
- sleep(10);
+ sleep(1000/curplayer->fps);
dt += nanosec() - thisframe;
start = nanosec();
draw(screen, screen->r, curframe, nil, ZP);
@@ -318,7 +319,7 @@
goto err;
}
- p->frames = chancreate(sizeof(Frame*), 30); // FIXME prerender?
+ p->frames = chancreate(sizeof(Frame*), 15); // FIXME prerender?
p->done = chancreate(sizeof(ulong), 0);
p->lastframe = 0;