Windows: Add manifest file and set "High DPI Aware" true
authoradrido <addi@king-arthur.eu>
Sat, 29 Oct 2016 16:01:37 +0000 (18:01 +0200)
committerparamat <mat.gregory@virginmedia.com>
Mon, 7 Nov 2016 21:55:01 +0000 (21:55 +0000)
This resolves washy font and incorrect mouse handling on Windows if
a screen with high DPI is used.

misc/minetest.exe.manifest [new file with mode: 0644]
src/CMakeLists.txt

diff --git a/misc/minetest.exe.manifest b/misc/minetest.exe.manifest
new file mode 100644 (file)
index 0000000..3c32b0f
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
+        <security>
+            <requestedPrivileges>
+                <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
+            </requestedPrivileges>
+        </security>
+    </trustInfo>
+    <application xmlns="urn:schemas-microsoft-com:asm.v3">
+        <windowsSettings>
+            <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
+        </windowsSettings>
+    </application>
+</assembly>
index cb04c9425fb33810306ca13e4338112a7567bd8d..1983bb07844562d3e1c7ae77fd3fb7c6ba369986 100644 (file)
@@ -474,6 +474,7 @@ set(common_SRCS
 # This gives us the icon and file version information
 if(WIN32)
        set(WINRESOURCE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../misc/winresource.rc")
+       set(MINETEST_EXE_MANIFEST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../misc/minetest.exe.manifest")
        if(MINGW)
                if(NOT CMAKE_RC_COMPILER)
                        set(CMAKE_RC_COMPILER "windres.exe")
@@ -486,7 +487,7 @@ if(WIN32)
                        DEPENDS ${WINRESOURCE_FILE})
                SET(common_SRCS ${common_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/winresource_rc.o)
        else(MINGW) # Probably MSVC
-               set(common_SRCS ${common_SRCS} ${WINRESOURCE_FILE})
+               set(common_SRCS ${common_SRCS} ${WINRESOURCE_FILE} ${MINETEST_EXE_MANIFEST_FILE})
        endif(MINGW)
 endif()