Skip to content

Commit 2952326

Browse files
adridoparamat
authored andcommittedNov 7, 2016
Windows: Add manifest file and set "High DPI Aware" true
This resolves washy font and incorrect mouse handling on Windows if a screen with high DPI is used.
1 parent ad4bf2c commit 2952326

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed
 

Diff for: ‎misc/minetest.exe.manifest

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
3+
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
4+
<security>
5+
<requestedPrivileges>
6+
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
7+
</requestedPrivileges>
8+
</security>
9+
</trustInfo>
10+
<application xmlns="urn:schemas-microsoft-com:asm.v3">
11+
<windowsSettings>
12+
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
13+
</windowsSettings>
14+
</application>
15+
</assembly>

Diff for: ‎src/CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,7 @@ set(common_SRCS
474474
# This gives us the icon and file version information
475475
if(WIN32)
476476
set(WINRESOURCE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../misc/winresource.rc")
477+
set(MINETEST_EXE_MANIFEST_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../misc/minetest.exe.manifest")
477478
if(MINGW)
478479
if(NOT CMAKE_RC_COMPILER)
479480
set(CMAKE_RC_COMPILER "windres.exe")
@@ -486,7 +487,7 @@ if(WIN32)
486487
DEPENDS ${WINRESOURCE_FILE})
487488
SET(common_SRCS ${common_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/winresource_rc.o)
488489
else(MINGW) # Probably MSVC
489-
set(common_SRCS ${common_SRCS} ${WINRESOURCE_FILE})
490+
set(common_SRCS ${common_SRCS} ${WINRESOURCE_FILE} ${MINETEST_EXE_MANIFEST_FILE})
490491
endif(MINGW)
491492
endif()
492493

0 commit comments

Comments
 (0)