What does "Allow Hidpi" do?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Liemaeu

I found the option “Allow Hidpi” in project settings → Display → Window → Dpi

What does the settings acutally do?

It says that it only affects Windows and macOS becuase “DPI-awareness fallbacks” are not supported on Linux.

I set the size to 3840 (Width) and 2160 (Height), the maximum resolution I want to support. I set the Test Width to 1920 and the Test Height to 1080, my real resolution (of the pc I am developing the game on). I set the Stretch Mode to 2D and the Aspect to keep, to make the game compatible with other screen sizes (like 21:9, 16:10).

Do Windows and macOS need this Hidpi option to work?

I use Godot 3.2.2 on Ubuntu 18.04.

:bust_in_silhouette: Reply From: mangecoeur

From what I understand, the allow hdpi option mainly affects how the image is scaled when the game window is resized. Without allow hdpi, Godot stretches the viewport, while with allow hdpi, godot renders at its ‘native’ resolution and lets the OS handle upscaling.