Skip to content

Display and control your Android device

Set DPI awareness for Windows

Romain Vimontad11c5babb0f
diff --git a/app/scrcpy-windows.manifest b/app/scrcpy-windows.manifest
new file mode 100644
index 00000000..f2708ecb
--- /dev/null
+++ b/app/scrcpy-windows.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/app/scrcpy-windows.rc b/app/scrcpy-windows.rc
index 8e3a585e..7525d092 100644
--- a/app/scrcpy-windows.rc
+++ b/app/scrcpy-windows.rc
@@ -1,5 +1,8 @@
+#include <winuser.h>
+
0 ICON "../data/icon.ico"
-1 VERSIONINFO
+1 RT_MANIFEST "scrcpy-windows.manifest"
+2 VERSIONINFO
BEGIN
BLOCK "StringFileInfo"
BEGIN