Factorio – How to Get Windows System Scaling to Work on Version 0.17

factorio

Context

I play games in a window on a 4k monitor. Because my eyesight is terrible and for performance reasons, I play games in 1920×1080 resolution, and use Windows to scale things up:

Windows scaling

via compatibilityhigh DPI settings on a shortcut:

DPI system enhanced scaling

Factorio scaling issue

Usually this approach to scaling works acceptably.

However, with Factorio as of version 0.17 it seems the window gets scaled, but the game does not, resulting in the game taking up around a quarter of the screen and the rest being black, with the cursor offset:

factorio unscaled

The game settings – in particular Graphics options and UI scaling do not seem to affect this.

How can I get Factorio to respect Windows scaling?

Best Answer

Changing Windows' scaling to 'System' scales correctly

Whereas using the setting "Override high DPI scaling behaviour. Scaling performed by: 'System (Enhanced)'" worked on earlier versions; changes to rendering in 0.17 means this approach no longer works:

Rewritten rendering backend

This release has a completely new rendering backend, written almost from scratch to our exact requirements. The new engine takes advantage of more modern GPU features and is highly optimized. What this means is that the game can now work with much less VRAM and allow players with older videos cards to still enjoy the game in high resolution at 60 FPS. More details: FFF-251, FFF-264, FFF-281.

Due to the more modern architecture, some issues may be present with certain hardware configurations, please see this forum thread if you experience any graphical problems.

However, changing to "Override high DPI scaling behaviour. Scaling performed by: 'System'" now has the correct scaling effect:

system scaling

result:

result

High DPI settings

The three options are handled differently, as explained in an MS Answers answer by Louie Del:

There are lots of improvements and upgrade made in the Windows 10 Anniversary Update, this includes the new DPI options with enhanced feature. To give you an overview of the settings under Override high DPI scaling behavior, you can check the following settings and its effects:

ms answers answer

  • The Application setting was previously referred to as "Disable display scaling on high-DPI settings". It also forces the process to run in per-monitor DPI awareness mode. Windows will be prompted not to bitmap stretch UI (User Interface) from the exe in question when the DPI changes.
  • The System setting will bitmap stretch the UI when the DPI changes.
  • The System (Enhanced) setting is for applications that are GDI-based Windows or Graphics Device Interface (GDI) scaling. It will DPI scale the application on a per-monitor basis. This means that application will definitely become per-monitor DPI aware.

I have asked a question over on SuperUser about the technical difference between the scaling options. As BlueRaja - Danny Pflughoeft notes in a comment:

GDI is an interface for drawing lines and shapes onto a window. It's easy to use, but slow, so it's almost never used for games. It's largely used in older apps.