From 5e3e01cac08fafa9a5616db3e2d3518e7724ada5 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 3 Nov 2018 18:21:22 +0000 Subject: [PATCH] fix resolution on HiDPI displays under Windows The same Windows functionality as scaling user interface elements, confuses fullscreen games unless they set a particular of metadata to indicate that they perform the scaling by themselves. What happened was treating 2160p as 1440p despite the former being chosen. The same occured with other game title prior to introducing the metadata bits. Fortunately with CMake there's no need to invoke the mt.exe "manifest tool" manually. Note that the setting of "per-monitor DPI aware" still leaves openmw confused, hence the choice of global-DPI-aware. --- CHANGELOG.md | 1 + apps/openmw/CMakeLists.txt | 1 + files/windows/openmw.exe.manifest | 18 ++++++++++++++++++ files/windows/openmw.rc | 1 + 4 files changed, 21 insertions(+) create mode 100644 files/windows/openmw.exe.manifest diff --git a/CHANGELOG.md b/CHANGELOG.md index d50c96ef4..aecf2fa4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ 0.46.0 ------ + Bug #3623: Fix HiDPI on Windows Feature #2229: Improve pathfinding AI Feature #3442: Default values for fallbacks from ini file Task #4686: Upgrade media decoder to a more current FFmpeg API diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt index 04584a342..0bb6e900d 100644 --- a/apps/openmw/CMakeLists.txt +++ b/apps/openmw/CMakeLists.txt @@ -4,6 +4,7 @@ set(GAME engine.cpp ${CMAKE_SOURCE_DIR}/files/windows/openmw.rc + ${CMAKE_SOURCE_DIR}/files/windows/openmw.exe.manifest ) if (ANDROID) diff --git a/files/windows/openmw.exe.manifest b/files/windows/openmw.exe.manifest new file mode 100644 index 000000000..c0b358a4a --- /dev/null +++ b/files/windows/openmw.exe.manifest @@ -0,0 +1,18 @@ + + + + Q2PRO + + + + + + + + + + True + + + + diff --git a/files/windows/openmw.rc b/files/windows/openmw.rc index b879a7dd5..f41172a3d 100644 --- a/files/windows/openmw.rc +++ b/files/windows/openmw.rc @@ -1 +1,2 @@ IDI_ICON1 ICON DISCARDABLE "openmw.ico" +CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "openmw.exe.manifest"