win-capture: Prevent WGC being selected when unavailable

This commit is contained in:
VodBox 2020-03-03 23:06:25 +13:00
parent 8f4f33aed8
commit 9aedc7e5b7

View File

@ -89,11 +89,11 @@ static enum window_capture_method
choose_method(enum window_capture_method method, bool wgc_supported,
const char *current_class)
{
if (method != METHOD_AUTO) {
if (method == METHOD_WGC && !wgc_supported)
method = METHOD_BITBLT;
if (!wgc_supported)
return METHOD_BITBLT;
if (method != METHOD_AUTO)
return method;
}
if (!current_class)
return METHOD_BITBLT;