shithub: choc

Download patch

ref: 5a8db1512bf95325d466086498b20474b769924f
parent: c39fd3c54c90748ae264b148ab79b70a9599650f
author: Simon Howard <[email protected]>
date: Sun Oct 27 23:37:26 EDT 2013

Declare Windows binaries as DPI-aware to prevent the OS from applying
DPI virtualization.

Subversion-branch: /branches/v2-branch
Subversion-revision: 2727

--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -214,7 +214,8 @@
 
 EXTRA_DIST =                        \
         icon.c                      \
-        doom-screensaver.desktop.in
+        doom-screensaver.desktop.in \
+        manifest.xml
 
 appdir = $(prefix)/share/applications
 app_DATA = @[email protected]
--- /dev/null
+++ b/src/manifest.xml
@@ -1,0 +1,12 @@
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
+
+  <!-- Declare app as DPI aware, so that Windows Vista and later will not
+       apply DPI virtualization. -->
+
+  <asmv3:application>
+    <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
+      <dpiAware>true</dpiAware>
+    </asmv3:windowsSettings>
+  </asmv3:application>
+</assembly>
+
--- a/src/resource.rc.in
+++ b/src/resource.rc.in
@@ -1,5 +1,7 @@
 1 ICON "../data/doom.ico"
 
+CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "manifest.xml"
+
 1 VERSIONINFO
 PRODUCTVERSION @WINDOWS_RC_VERSION@
 FILEVERSION @WINDOWS_RC_VERSION@
--- a/src/setup/setup-manifest.xml.in
+++ b/src/setup/setup-manifest.xml.in
@@ -29,5 +29,14 @@
       <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> <!-- Vista -->
     </application>
   </compatibility>
+
+  <!-- Declare app as DPI aware, so that Windows Vista and later will not
+       apply DPI virtualization. -->
+
+  <asmv3:application>
+    <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
+      <dpiAware>true</dpiAware>
+    </asmv3:windowsSettings>
+  </asmv3:application>
 </assembly>