# HG changeset patch # User reimar # Date 1124453812 0 # Node ID 03884f9a35ccecadd7398d4ccc1f393c3ef84fef # Parent d5374d07492aa3477f1124fdc5c4f1155d8b40b0 Do not set SwapInterval for values < 0. diff -r d5374d07492a -r 03884f9a35cc DOCS/man/en/mplayer.1 --- a/DOCS/man/en/mplayer.1 Fri Aug 19 12:09:44 2005 +0000 +++ b/DOCS/man/en/mplayer.1 Fri Aug 19 12:16:52 2005 +0000 @@ -2718,6 +2718,7 @@ .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 -r d5374d07492a -r 03884f9a35cc libvo/vo_gl.c --- a/libvo/vo_gl.c Fri Aug 19 12:09:44 2005 +0000 +++ b/libvo/vo_gl.c Fri Aug 19 12:16:52 2005 +0000 @@ -150,7 +150,7 @@ 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;