summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2022-07-19 13:44:58 +0200
committerTimo Rothenpieler <timo@rothenpieler.org>2022-07-19 13:57:38 +0200
commit926f355aff8fdf0a077d948e961f79d2c5daf58e (patch)
tree8e8f2c8336c64cef9547a3b4ddff303bdeb7ab14 /libavfilter
parentecd0a7c5bd105367e8c16c2d59648b96efccec18 (diff)
avfilter/vsrc_ddagrab: check for existence of DPI_AWARENESS_CONTEXT
Apparently some (broken?) Windows SDK versions define IDXGIOutput5 but not DPI_AWARENESS_CONTEXT. So we need to explicitly check for its existence.
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vsrc_ddagrab.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavfilter/vsrc_ddagrab.c b/libavfilter/vsrc_ddagrab.c
index 5668eda051..98daec1d04 100644
--- a/libavfilter/vsrc_ddagrab.c
+++ b/libavfilter/vsrc_ddagrab.c
@@ -18,9 +18,9 @@
#include "config.h"
-#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0602
+#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0A00
#undef _WIN32_WINNT
-#define _WIN32_WINNT 0x0602
+#define _WIN32_WINNT 0x0A00
#endif
#define WIN32_LEAN_AND_MEAN
@@ -151,7 +151,7 @@ static av_cold int init_dxgi_dda(AVFilterContext *avctx)
IDXGIAdapter *dxgi_adapter = NULL;
IDXGIOutput *dxgi_output = NULL;
IDXGIOutput1 *dxgi_output1 = NULL;
-#if HAVE_IDXGIOUTPUT5
+#if HAVE_IDXGIOUTPUT5 && HAVE_DPI_AWARENESS_CONTEXT
IDXGIOutput5 *dxgi_output5 = NULL;
typedef DPI_AWARENESS_CONTEXT (*set_thread_dpi_t)(DPI_AWARENESS_CONTEXT);
@@ -190,7 +190,7 @@ static av_cold int init_dxgi_dda(AVFilterContext *avctx)
return AVERROR_EXTERNAL;
}
-#if HAVE_IDXGIOUTPUT5
+#if HAVE_IDXGIOUTPUT5 && HAVE_DPI_AWARENESS_CONTEXT
user32_module = dlopen("user32.dll", 0);
if (!user32_module) {
av_log(avctx, AV_LOG_ERROR, "Failed loading user32.dll\n");