summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-08-19 12:16:52 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-08-19 12:16:52 +0000
commitf37f504f2ab027bd12347e8db8a31faa8254d0ee (patch)
tree3eaf9e58c27d10a332f90e2ef3282e6f29ab8d3c
parent5da34263f61bb1f0170904abf5d875b13a5db6f4 (diff)
downloadmpv-f37f504f2ab027bd12347e8db8a31faa8254d0ee.tar.bz2
mpv-f37f504f2ab027bd12347e8db8a31faa8254d0ee.tar.xz
Do not set SwapInterval for values < 0.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16272 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--DOCS/man/en/mplayer.11
-rw-r--r--libvo/vo_gl.c2
2 files changed, 2 insertions, 1 deletions
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=<n>
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;