BC46 / freelancer-hd-edition

Freelancer: HD Edition is a mod that aims to improve every aspect of the game Freelancer (2003) while keeping the look and feel as close to vanilla as possible.
https://www.moddb.com/mods/freelancer-hd-edition
168 stars 15 forks source link

DPI Aware Application Manifest #133

Closed HaydnTrigg closed 1 year ago

HaydnTrigg commented 1 year ago

I use a 3840x2160 Display Resolution at 1.5x scaling. By default, Freelancer is not DPI aware and so the 3840x2160 resolution is limited to 2560x1440 resolution.

By patching the manifest using the following data Freelancer can be made DPI aware and can reach the correct display resolution and no longer has blurry pixels.

<?xml version="1.0" encoding="UTF-8"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
   <application xmlns="urn:schemas-microsoft-com:asm.v3">
      <windowsSettings>
         <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
      </windowsSettings>
   </application>
</assembly>

I used Resource Hacker to inject the manifest file to test this fix. This can be done by saving the snipped to a text file, and then adding a binary resource and manually setting the "Resource Type" option to "MANIFEST" and using a resource name of "1".

image

BC46 commented 1 year ago

Thank you for sharing this information! Will be implemented soon.

erikroe commented 1 year ago

@HaydnTrigg I just tried repoducing the issue on Windows 10 and Linux under WINE with 100% DPI Scaling and 125 and 150% scaling even with attached secondary screen via HDMI. Freelancer does always run at the native resolution for me without the described patch. My screen size was natively 1920x1080 for the Windows test and 3840x1600 on the Linux WINE test. Can you please describe if there's any sort of specific conditions on your OS, setup, or FL start parameters/installation type that may help reproducing this?