From f37f504f2ab027bd12347e8db8a31faa8254d0ee Mon Sep 17 00:00:00 2001 From: reimar Date: Fri, 19 Aug 2005 12:16:52 +0000 Subject: [PATCH] Do not set SwapInterval for values < 0. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16272 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/man/en/mplayer.1 | 1 + libvo/vo_gl.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index 5ffd71da48..efa7abe967 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -2718,6 +2718,7 @@ Slower but in some cases more correct output (default: disabled). .IPs swapinterval= Minimum interval in displayed frames between to buffer swaps (default: 1). 1 is equivalent to enable VSYNC, 0 to disable VSYNC. +Values < 0 will leave it at the system default. This will limit the framerate to (horizontal refresh rate / n). Requires GLX_SGI_swap_control support to work. With some (most/all?) implementations this only works in fullscreen mode. diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index 657f548718..775d7333c0 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -150,7 +150,7 @@ static int initGl(uint32_t d_width, uint32_t d_height) { glClearColor( 0.0f,0.0f,0.0f,0.0f ); glClear( GL_COLOR_BUFFER_BIT ); - if (SwapInterval) + if (SwapInterval && swap_interval >= 0) SwapInterval(swap_interval); gl_buffer = 0; gl_buffersize = 0;