opengl: smoothmotion: wake up for next vsync a bit earlier

on my windows system this allows smoothmotion to work perfectly also in windowed
mode. There's no real right or wrong here, with the the only goal being to
always hit the next vsync. however, on cases where vsync timing is jittery (as
could happen with DWM), this patch tries to aim to the middle of the vsync cycle
to get as least affected as possible by such jitter.
This commit is contained in:
Avi Halachmi (:avih) 2015-03-17 20:04:46 +02:00 committed by wm4
parent f1746741de
commit c97f014576
1 changed files with 1 additions and 1 deletions

View File

@ -623,7 +623,7 @@ static bool render_frame(struct vo *vo)
if (in->vsync_timed) {
// this is a heuristic that wakes the thread up some
// time before the next vsync
target = next_vsync - MPMIN(in->vsync_interval / 3, 4e3);
target = next_vsync - MPMIN(in->vsync_interval / 2, 8e3);
// We are very late with the frame and using vsync timing: probably
// no new frames are coming in. This must be done whether or not