summaryrefslogtreecommitdiffstats
path: root/video/out/vo_x11.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/vo_x11.c')
-rw-r--r--video/out/vo_x11.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/video/out/vo_x11.c b/video/out/vo_x11.c
index 6b7a797412..461b05f22a 100644
--- a/video/out/vo_x11.c
+++ b/video/out/vo_x11.c
@@ -34,6 +34,7 @@
#include <errno.h>
+#include "present_sync.h"
#include "x11_common.h"
#include <sys/ipc.h>
@@ -307,6 +308,14 @@ static void flip_page(struct vo *vo)
struct priv *p = vo->priv;
Display_Image(p, p->myximage[p->current_buf]);
p->current_buf = (p->current_buf + 1) % 2;
+ vo_x11_present(vo);
+ present_sync_swap(vo->x11->present);
+}
+
+static void get_vsync(struct vo *vo, struct vo_vsync_info *info)
+{
+ struct vo_x11_state *x11 = vo->x11;
+ present_sync_get_info(x11->present, info);
}
// Note: REDRAW_FRAME can call this with NULL.
@@ -435,6 +444,7 @@ const struct vo_driver video_out_x11 = {
.control = control,
.draw_image = draw_image,
.flip_page = flip_page,
+ .get_vsync = get_vsync,
.wakeup = vo_x11_wakeup,
.wait_events = vo_x11_wait_events,
.uninit = uninit,