From 2c8edb8a8a75c774f7000f34518065fc9dad18b5 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Thu, 10 Dec 2015 15:54:30 -0800 Subject: [PATCH] win-capture: Clear GL error flag before initializing capture Some games don't catch GL errors via glGetError, so there's a possibility that an error will pass through to the capture calls, causing a false failure. The most simple solution is to just clear the error flag on each capture call. --- plugins/win-capture/graphics-hook/gl-capture.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/win-capture/graphics-hook/gl-capture.c b/plugins/win-capture/graphics-hook/gl-capture.c index c30c39742..bdb8890c6 100644 --- a/plugins/win-capture/graphics-hook/gl-capture.c +++ b/plugins/win-capture/graphics-hook/gl-capture.c @@ -728,6 +728,9 @@ static void gl_capture(HDC hdc) } } + /* reset error flag */ + glGetError(); + if (capture_should_stop()) { gl_free(); }