Godot - Ingore Windows (OS) scalling

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Chain
:warning: Old Version Published before Godot 3 was released.

Greetings!

Is there any way to by-pass OS scalling? I am currently working on a project which works fine on a lot of devices. But Godot fails to scale the game when a computer/laptop has scalling activated.

My question:

Is it possible to get the scalling percentage of the OS via Godot? Or is it currently impossible to fix this problem and I just have to deal with it?

Thanks in advance!

Which kind of scaling are you taling about? I’m not sure Godot can do that

Zylann | 2017-09-08 20:19

When you search in Windows for “Display Settings” you will come to these settings:

Imgur: The magic of the Internet

Lets say you have a FullHD high DPI Screen, your scalling percentrage will be set to 125% (laptop comes with this setting per default, if you disable it, your icons will be too small to read).

If you then start a Godot game, this scalling/zoom will be applied to the game too. Which results in a zommed in version of the game and therefore a unplayable version of the game if you have this scalling turned on.

I have tried two solutions (marked in red), but they both don’t help:

Imgur: The magic of the Internet

Any idea on how to solve this? Or is the scalling not the problem, but something else?

Chain | 2017-09-09 11:21

Well… doesn’t this mean your game will run in a higher resolution? Why not make your game simply support this? Did you see how other games do it?

Zylann | 2017-09-09 17:23

The game is zoomed in, if a computer has enabled a scalling higher than 100%. This is not good. Is there any way to ignore this scalling?

Chain | 2017-09-09 20:01

im mot sure what u r reffering to, just to make it clear
whenever you play a game made in Godot(test play)
the game us resized 125% so it looks like it is zoomed in your
device(thewhole game streched out of the dusplay of the device)
if so.

does setting the game to fullscreen still do this?

also try to print an OS.get_screen_size() on ready and check if the result is the same as your device resolution.

LainVohnDyrec | 2017-09-11 10:33

No fullscreen doesn’t help and the screensize stays the same.

Chain | 2017-09-11 14:07

I’ve run into this on a game I recently released, currently I’m just telling users to override DPI scaling for the application.

Here’s how it is done on Windows:

  1. Right click the exe and go to Properties
  2. Go to the Compatibility tab
  3. Check the box next to “Override high DPI scaling behavior”
  4. Apply

If anyone uses Windows and wants to download this to see what I mean, here’s the game:

https://enmod.itch.io/school-years

Would love to know if there was a way to set that override flag on run though.

EnlightenedModifier | 2017-09-29 22:40