[GEN][ZH] Add Windows application manifest to executables #595
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, Windows treats the Gen and ZH executables as DPI unaware and forcefully scales the content of all application windows when the display scaling factor is set to something other than 100%. This means that when running the game in windowed mode with a resolution of 800x600, the real window size on screens with scaling set to 200% will be 1600x1200, and every pixel will simply be stretched to four pixels. To prevent this system scaling, the application should indicate to the system that it is DPI aware. The best way to achieve this is to add an application manifest with the
dpiAware
setting.Another feature that can be configured via the application manifest is the application of modern visual styles. By default, applications are linked to ComCtl32.dll version 5, which contains UI elements styled like Windows 98/ME/2000. To use modern-looking elements, the application should request loading ComCtl32.dll version 6, which supports themed UI elements from Windows XP and later.
Changes
This PR adds an application manifest that addresses both issues:
Screenshots on screen with 200% display scaling
Without Manifest
Splash screen window scaled to 1600x1200 from 800x600, and the message dialog has stretched pixelated text, a Windows 98-style button, and an icon.
With Manifest
Splash screen remains unscaled at 800x600, and the message dialog has crisp text, a modern-looking button, and an icon.