瀏覽代碼

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.
jp9000 10 年之前
父節點
當前提交
2c8edb8a8a
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      plugins/win-capture/graphics-hook/gl-capture.c

+ 3 - 0
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();
 	}