Windows app manifest added to enable PerMonitorV2 DPI awareness

This commit is contained in:
Bart Trzynadlowski 2023-03-15 18:24:01 -07:00
parent f497de50d1
commit 95fc08e0a3
3 changed files with 24 additions and 1 deletions

View file

@ -104,7 +104,8 @@ PLATFORM_LDFLAGS = -static -L$(sort $(PLATFORM_LIB_DIR)) $(SDL2_LIBS) $(PLATFORM
PLATFORM_SRC_FILES = \ PLATFORM_SRC_FILES = \
Src/OSD/Windows/DirectInputSystem.cpp \ Src/OSD/Windows/DirectInputSystem.cpp \
Src/OSD/Windows/FileSystemPath.cpp \ Src/OSD/Windows/FileSystemPath.cpp \
Src/OSD/Windows/WinOutputs.cpp Src/OSD/Windows/WinOutputs.cpp \
Src/OSD/Windows/SupermodelResources.rc
.PHONY: clean .PHONY: clean
@ -114,3 +115,14 @@ clean:
$(SILENT)echo Cleaning up $(BIN_DIR) and $(OBJ_DIR)... $(SILENT)echo Cleaning up $(BIN_DIR) and $(OBJ_DIR)...
$(SILENT)$(DELETE) $(BIN_DIR) $(SILENT)$(DELETE) $(BIN_DIR)
$(SILENT)$(DELETE) $(OBJ_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 $@

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
<asmv3:application>
<asmv3:windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>

View file

@ -0,0 +1,2 @@
#include "winuser.h"
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "Src/OSD/Windows/SupermodelManifest.xml"