[FFmpeg-devel] [PATCH 2/3] fftools: add DPI awareness manifest

Timo Rothenpieler timo at rothenpieler.org
Sun Aug 7 18:12:47 EEST 2022


Some filters, like gdigrab, rely on this to be set to see and report
proper dimensions.
---
 fftools/Makefile         | 3 +++
 fftools/fftools.manifest | 9 +++++++++
 fftools/fftoolsres.rc    | 2 ++
 3 files changed, 14 insertions(+)
 create mode 100644 fftools/fftools.manifest
 create mode 100644 fftools/fftoolsres.rc

diff --git a/fftools/Makefile b/fftools/Makefile
index 6285e6eacb..0348ac9cf1 100644
--- a/fftools/Makefile
+++ b/fftools/Makefile
@@ -20,6 +20,9 @@ OBJS-ffmpeg +=                  \
 
 define DOFFTOOL
 OBJS-$(1) += fftools/cmdutils.o fftools/opt_common.o fftools/$(1).o $(OBJS-$(1)-yes)
+ifdef HAVE_GNU_WINDRES
+OBJS-$(1) += fftools/fftoolsres.o
+endif
 $(1)$(PROGSSUF)_g$(EXESUF): $$(OBJS-$(1))
 $$(OBJS-$(1)): | fftools
 $$(OBJS-$(1)): CFLAGS  += $(CFLAGS-$(1))
diff --git a/fftools/fftools.manifest b/fftools/fftools.manifest
new file mode 100644
index 0000000000..f2708ecb13
--- /dev/null
+++ b/fftools/fftools.manifest
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
+  <asmv3:application>
+    <asmv3:windowsSettings>
+      <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
+      <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
+    </asmv3:windowsSettings>
+  </asmv3:application>
+</assembly>
diff --git a/fftools/fftoolsres.rc b/fftools/fftoolsres.rc
new file mode 100644
index 0000000000..0b8b7c86cb
--- /dev/null
+++ b/fftools/fftoolsres.rc
@@ -0,0 +1,2 @@
+#include <windows.h>
+1 RT_MANIFEST fftools.manifest
-- 
2.34.1



More information about the ffmpeg-devel mailing list