From 95fc08e0a3f031dd3f6f325666c7d1668c2c3d05 Mon Sep 17 00:00:00 2001 From: Bart Trzynadlowski Date: Wed, 15 Mar 2023 18:24:01 -0700 Subject: [PATCH] Windows app manifest added to enable PerMonitorV2 DPI awareness --- Makefiles/Makefile.Win32 | 14 +++++++++++++- Src/OSD/Windows/SupermodelManifest.xml | 9 +++++++++ Src/OSD/Windows/SupermodelResources.rc | 2 ++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 Src/OSD/Windows/SupermodelManifest.xml create mode 100644 Src/OSD/Windows/SupermodelResources.rc diff --git a/Makefiles/Makefile.Win32 b/Makefiles/Makefile.Win32 index 0d984dc..6cdb5cf 100644 --- a/Makefiles/Makefile.Win32 +++ b/Makefiles/Makefile.Win32 @@ -104,7 +104,8 @@ PLATFORM_LDFLAGS = -static -L$(sort $(PLATFORM_LIB_DIR)) $(SDL2_LIBS) $(PLATFORM PLATFORM_SRC_FILES = \ Src/OSD/Windows/DirectInputSystem.cpp \ Src/OSD/Windows/FileSystemPath.cpp \ - Src/OSD/Windows/WinOutputs.cpp + Src/OSD/Windows/WinOutputs.cpp \ + Src/OSD/Windows/SupermodelResources.rc .PHONY: clean @@ -114,3 +115,14 @@ clean: $(SILENT)echo Cleaning up $(BIN_DIR) and $(OBJ_DIR)... $(SILENT)$(DELETE) $(BIN_DIR) $(SILENT)$(DELETE) $(OBJ_DIR) + + +############################################################################### +# Platform-specific Rules +# +# This section must be placed *after* the inclusion of Makefiles/Rules.inc. +############################################################################### + +$(OBJ_DIR)/SupermodelResources.o: Src/OSD/Windows/SupermodelResources.rc Src/OSD/Windows/SupermodelManifest.xml + $(info Compiling : $< -> $@) + $(SILENT)windres -i Src/OSD/Windows/SupermodelResources.rc -o $@ \ No newline at end of file diff --git a/Src/OSD/Windows/SupermodelManifest.xml b/Src/OSD/Windows/SupermodelManifest.xml new file mode 100644 index 0000000..3107f64 --- /dev/null +++ b/Src/OSD/Windows/SupermodelManifest.xml @@ -0,0 +1,9 @@ + + + + + true + PerMonitorV2 + + + \ No newline at end of file diff --git a/Src/OSD/Windows/SupermodelResources.rc b/Src/OSD/Windows/SupermodelResources.rc new file mode 100644 index 0000000..f48ce01 --- /dev/null +++ b/Src/OSD/Windows/SupermodelResources.rc @@ -0,0 +1,2 @@ +#include "winuser.h" +CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "Src/OSD/Windows/SupermodelManifest.xml" \ No newline at end of file